Article View: comp.editors
Article #1Re: elvis exit value
From: Jun-ichiro ITOH
Date: Tue, 27 Oct 1992 08:20
Date: Tue, 27 Oct 1992 08:20
39 lines
1881 bytes
1881 bytes
Hello, this is Jun-ichiro ITOH, from Tokyo.
On Mon, 27 Oct 1992 01:31:29 JST, sti@phantom.cs.hut.fi (Sami-Jaakko Tikka) said:
sti> Is there a rational logic behind the exit value of elvis under SunOS
sti> 4.1.2.?
sti> I hate it when elvis sometimes decides to exit with an exit value 1
sti> instead of 0 although I haven't done anything offensive. Quite many
sti> programs which start elvis for me to do my editing seem to think
sti> something failed because elvis exited with 1.
sti> I know I could write a wrapper script which would always exit 0 but I
sti> would first like to know if there is a reason for elvis's normal
sti> behaviour.
The return value '1' means "elvis did overwrite operation onto
file."
If you don't like this, patch TMP.C as following:
---
in function tmpsave(): comment out these 4 lines
if (!strcmp(origname, filename))
{
exitcode |= 1;
}
---
Same problem occurs when you use ELVIS 1.6 on 386bsd.
When we do 'vipw' for passwd editing, vipw will fail when
elvis returns '1'. The patch above can also be used to fix the
problem.
I hope this information can help you. Thank you.
--
itojun@mt.cs.keio.ac.jp(Jun-ichiro ITOH)
Keio Univ. Faculty of Science and Technology
Department of Computer Science Tokoro Lab.
Technical Details
Message-ID:
<ITOJUN.92Oct27172027@glock.mt.cs.keio.ac.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!sun-barr!sh.wide!kogwy!cs-keio!itojunReferences:
<1992Oct26.163129.5528@cs.hut.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!sun-barr!sh.wide!kogwy!cs-keio!itojun From: itojun@mt.cs.keio.ac.jp (Jun-ichiro ITOH) Subject: Re: elvis exit value In-Reply-To: sti@phantom.cs.hut.fi's message of Mon, 27 Oct 1992 01:31:29 JST Message-ID: <ITOJUN.92Oct27172027@glock.mt.cs.keio.ac.jp> Sender: news@sync.cs.keio.ac.jp Nntp-Posting-Host: mt-sync-relay.mt.cs.keio.ac.jp Organization: Tokoro Laboratory, Keio University, Yokohama Japan. References: <1992Oct26.163129.5528@cs.hut.fi> Date: Tue, 27 Oct 1992 08:20:27 GMT Lines: 39