in reply to Error code 15360 on close filehandle

See system for how the error code of programs is arranged.

Your program used exit(60);. Lots of programs exit with the errno of the error as the exit code. On one of my systems, errno 60 is "Device not a stream".

$ perl -E'say $!=60' Device not a stream

Update: Added examination of error code.

Replies are listed 'Best First'.
Re^2: Error code 15360 on close filehandle
by perlnew1611 (Initiate) on Nov 28, 2011 at 21:09 UTC
    Hello ikegami,

    Thanks for the reply.. I am new to perl...so need some clarification...so do you mean to say that the "$test" program in "open(TH, "|$test >$tmpfn" )" is returning the error code? and it is not a standard error code due to some problem with call that it is failing.

    In the documentation it is written that when using piped open, the open might suceeded..but that does not mean that the command in the open succeeded, it only means the fork succeeded, so I also verified using ps -ef and the command is getting executed.

    Due to this the outfile $tmpfn is also empty

    thanks

      so do you mean to say that the "$test" program in "open(TH, "|$test >$tmpfn" )" is returning the error code?

      The error comes from the child via the waitpid done by close.

      It could from an error that occurred while trying to launch a shell to execute that command produced by "$test >$tmpfn". (Hopefully this isn't possible on your system.)

      Otherwise, it's the error code of the launched shell. The shell will use something based on the error code of the last program it launched as its exit code.

      and it is not a standard error code due to some problem with call that it is failing.

      There is no standard for exit codes except for zero: success, non-zero: error. That's why the meaning of 60 is a guess.