W32 version tries to write to /dev/null

Henry Hertz Hobbit hhhobbit at securemecca.net
Wed May 9 02:21:53 CEST 2007


Andrew Berg wrote:

> Werner Koch wrote:
>
>>> On Mon,  7 May 2007 16:58, bahamut at digital-signal.net said:
>>>
>>>
>>> gpg: can't create `/dev/null': No such file or directory
>>> gpg: signing failed: file create error
>>> 
>>> Fixed in my working copy by using /dev/nul instead
>
> How would that help? /dev/nul can't exist on a Windows
> system either.

But NUL (nul) does exist, at least for now:

command 1> NUL 2>&1

I use it all the time in my BAT, VBS, JS and PL (PERL) script
files. But almost none of those script files work properly any
more with Vista because any time you wander into protected areas
you need administration privileges. I am talking about NORMAL
Vista accounts, nothing special. Actually, you can start an
elevated shell on Vista to run the script, but that is a real
pain if you made it so people could just double-click on
script files to run them. Here is the article on NUL and
redirection:

http://support.microsoft.com/kb/110930

Just be sure if you are throwing it away, then throw it ALL
away.  If you don't, you will still see the message. I have NO
idea whether it works the same in both scripts and inside
C / C++ / C# programs.  Windows is notorious for having
scripting and binaries frequently behaving differently and you
can't interspangle a script that calls a binary that in turn
calls another script on pre-Vista Windows like you do on 'nix
machines. Supposedly, the new PowerShell (PS1) scripting is
going to make the mixing of binaries and scripts possible;
hopefully NUL will be a first class object.  BAT is gone on
Vista, and PowerShell is Object shell scripting (with LOTS
of gotchas).

HHH



More information about the Gnupg-users mailing list