dayankoven
Programmer
Hi there fellow experts,
I've got a C++ module which invokes a UNIX system call (i.e cp). Say for example, when i perform the copy function, and the specified directory ran out of space, the copy function will fail. The requirement is for the C++ module to catch this error. My question would then be, how do i get the actual return code from UNIX command($? just gives either 0 or 1). I would like to know the actual return code so that i would be able to distinguish this error from any other error and generate the error log accordingly. A return code of non-zero doesn't help very much when we are looking for specifics. Really appreciate your time and help. Thanks in advance.
I've got a C++ module which invokes a UNIX system call (i.e cp). Say for example, when i perform the copy function, and the specified directory ran out of space, the copy function will fail. The requirement is for the C++ module to catch this error. My question would then be, how do i get the actual return code from UNIX command($? just gives either 0 or 1). I would like to know the actual return code so that i would be able to distinguish this error from any other error and generate the error log accordingly. A return code of non-zero doesn't help very much when we are looking for specifics. Really appreciate your time and help. Thanks in advance.