in reply to "exit 1" and "exit(1)" are apparently not the same

Hi Rob. I'm confident you know that the "exit" return codes are from the exit command given to the Windows "cmd" display. I have used Windows for years and am still mystified at some of its quirks. There is an extensive description of the cmd "exit" return codes in: https://ss64.com/nt/exit.html#:~:text=To%20close%20an%20interactive%20command,an%20alternative%20to%20typing%20EXIT.. Hope this helps.

"It's not how hard you work, it's how much you get done."

  • Comment on Re: "exit 1" and "exit(1)" are apparently not the same

Replies are listed 'Best First'.
Re^2: "exit 1" and "exit(1)" are apparently not the same
by syphilis (Archbishop) on Nov 19, 2023 at 07:57 UTC
    ... you know that the "exit" return codes are from the exit command given to the Windows "cmd" display.

    Duh ... a more accurate appraisal would be .. you should have realized that the "exit" return codes are from the exit command given to the Windows "cmd" display :-(
    I needed to instead be looking at (eg):
    D:\>perl -le "$x = 1; system perl, '-le', \"exit ($x)\"; print $?;" 256 D:\>perl -le "$x = 1; system perl, '-le', \"exit $x\"; print $?;" 256
    Thanks roho !!

    Cheers,
    Rob