Re: tar command



On 2/24/06, Irfan J Sayed <irfsayed@xxxxxxxxxx> wrote:
snip
`$CT lock vob:$vob_tag`;
snip
`$cc stop`;
snip
`$cc start`;
snip
`$CT unlock vob:$vob_tag`;
snip

I take back my last comment. You are using the backquotes
incorrectly. You should only use backquotes when you want to capture
the stdout of the program you are running. These should all be calls
to the system() function. Also you should be checking the return code
of the commands to make sure the worked.

if (system("$cc lock vob:$vob_tag")) {
print stderr "lock failed\n";
exit 1;
}

if (system("$cc stop") != 0) {
print stderr "stop failed\n";
exit 2;
}

etc.
.



Relevant Pages

  • Re: Need Search::Binary examples
    ... print STDERR "I can't seem to find a file named\n"; ... print STDERR "Press any key to exit this window and try again.\n"; ...
    (comp.lang.perl.misc)
  • Re: Pointers
    ... An exit status of one is not portable. ... EXIT_SUCCESS for normal termination and EXIT_FAILURE for abnormal ones. ... which will call abort() if I was wrong, so that I can check what ...
    (comp.lang.c)
  • Re: catching exit
    ... The code is covered with 'exit' calls. ... language, whose name is that of our local favorite language with a ... And rewriting the now-library to ...
    (comp.lang.c)
  • Re: Printing files every step
    ... snip ... ... your code is 100% correct from the coding and logic points of view. ... Does "the user has to close files properly" imply that if I fail to ... Note that the standard says that exit() closes all open streams (and ...
    (comp.lang.c)
  • Re: Trip Notes: DC -> GA and back
    ... I-95 (to exit 33 in South Carolina) ...
    (misc.transport.road)