Nmap Development mailing list archives
Re: Ndiff included in Windows zip distribution
From: David Fifield <david () bamsoftware com>
Date: Thu, 5 Feb 2009 02:14:34 +0100
On Wed, Feb 04, 2009 at 06:39:14PM -0600, DePriest, Jason R. wrote:
would using "%COMSPEC%" /c "%PYTHON%" "%PROG%" %* maintain the exit state?
You know what, it turns out that the way I wrote the script, the ndiff exit code is propagated outside the batch file, because the call to python.exe is the very last statement. I had it written in a different way before where it didn't work and didn't test it again when I rewrote it. And in fact the "exit /b 1" syntax used when python.exe can't be found works too, at least in the Windows shell. If I break the python.exe search, run ndiff.bat, and "echo %ERRORLEVEL%", I get 1 as expected. What doesn't work is "echo $?" from a Cygwin Bash shell when the python.exe search fails--even though $? works when when ndiff.py is run successfully. I only tested it in Bash before so I didn't notice that it worked in cmd.exe. So apart from that very minor Cygwin issue, I think this is solved. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Ndiff included in Windows zip distribution David Fifield (Feb 04)
- Re: Ndiff included in Windows zip distribution Fyodor (Feb 04)
- Re: Ndiff included in Windows zip distribution Tom Sellers (Feb 04)
- Re: Ndiff included in Windows zip distribution David Fifield (Feb 04)
- Re: Ndiff included in Windows zip distribution DePriest, Jason R. (Feb 04)
- Re: Ndiff included in Windows zip distribution David Fifield (Feb 04)
- Re: Ndiff included in Windows zip distribution David Fifield (Feb 04)
- RE: Ndiff included in Windows zip distribution Aaron Leininger (Feb 04)
- Re: Ndiff included in Windows zip distribution Tom Sellers (Feb 04)
- Re: Ndiff included in Windows zip distribution Fyodor (Feb 04)