scsh-users
[Top] [All Lists]

Re: [0.4.2] run epf error return values buglet?

To: glenn@mathcs.emory.edu (Glenn Barry)
Subject: Re: [0.4.2] run epf error return values buglet?
From: glenn@mathcs.emory.edu (Glenn Barry)
Date: Fri, 8 Dec 1995 21:51:01 -0500
Cc: scsh-bugs@martigny.ai.mit.edu
Organization: Emory University, Dept of Math and CS
Reply-to: glenn@mathcs.emory.edu (Glenn Barry)
(the answer got forwarded from private mail to the scsh list
but not here on the scsh-bugs list so I'll post it...g "should have
RTFMed" b)

 Glenn> A unix cmd executed within the scsh run epf that returns a
 Glenn> non-zero value has that value multiplied by 256:

 Glenn>> (run (grep blah /etc/motd))
 Glenn>  256

 Glenn>> (run (wc /blah))
 Glenn>  wc: cannot open /blah
 Glenn>  512

 Glenn> Same behavior for SunOS 5.5 and 4.1.1 and Irix 5.3.

 Glenn> Bit-shifting bug or feature?

 Glenn> thx, glenn


------- Start of forwarded message -------
Return-Path: <shivers@ai.mit.edu>
From: shivers@ai.mit.edu (Olin Shivers)
Date: Fri, 8 Dec 1995 14:17:39 -0500
To: bdc@ai.mit.edu
Cc: glenn@mathcs.emory.edu
In-Reply-To: <9512081913.AA07948@life.ai.mit.edu> (message from Brian D. 
Carlstrom on Fri, 8 Dec 95 11:13:20 -0800)
Subject: Re: [0.4.2] run epf error return values buglet?
Reply-To: shivers@ai.mit.edu

    Scsh 0.4
    > (run (csh -c "exit 1"))
    256
    > (status:exit-val 256)
    1
    > 

You forgot that the exit status *encodes* several different types of
information. See STATUS:EXIT-VAL and its siblings in the manual. This
would be a fine thing to have posted to the list, as it may be confusing
others as well.
    -Olin

------- End of forwarded message -------

<Prev in Thread] Current Thread [Next in Thread>