Re: shell return values

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Lars Ivar Igesund wrote:

> I've made a small app that want to call through :sys
> AAP then bails out because the shell returned 1.
> I'm on Winxp, using cmd.exe. I don't understand why
> the return value of 1 means that there is something
> wrong. Where can I find documentation on the return
> values of the shell? I've looked through msdn, but
> couldn't find any specific values. I guess you must
> have found something since only the return value
> of 0 is accepted.

This is a Unix thing: an exit value zero means OK, a non-zero value
indicates a problem.

In case you need to ignore the value you can do:

	@try:
		:sys your-command-here
	@except:
		:print Warning: your-command-here returned non-zero

-- 
   [SIR LAUNCELOT runs back up the stairs, grabs a rope
   of the wall and swings out over the heads of the CROWD in a
   swashbuckling manner towards a large window.  He stops just short
   of the window and is left swing pathetically back and forth.]
LAUNCELOT: Excuse me ... could somebody give me a push ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.