Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Win32::Process::Create fails when i use ">" to redirect the screen output to a file

by prayaspatel (Initiate)
on Aug 28, 2012 at 01:14 UTC ( #990107=note: print w/replies, xml ) Need Help??


in reply to Win32::Process::Create fails when i use ">" to redirect the screen output to a file

Any help would be appreciated for above question....i can provide more information if you want

  • Comment on Re: Win32::Process::Create fails when i use ">" to redirect the screen output to a file

Replies are listed 'Best First'.
Re^2: Win32::Process::Create fails when i use ">" to redirect the screen output to a file
by Anonymous Monk on Aug 28, 2012 at 02:29 UTC
Re^2: Win32::Process::Create fails when i use ">" to redirect the screen output to a file
by james2vegas (Chaplain) on Aug 28, 2012 at 01:36 UTC
    I am open to correction, but I believe that > would not be a part of the command line passed to notepad, but rather would be passed to your shell (cmd.exe, cygwin's sh, whatever).

    Also I don't think that notepad.exe actually outputs anything to the console under usual circumstances, being a completely GUI application.

    I do not believe cmd.exe supports 2>&1 style redirects (apparently it does, see here, thanks for the headsup), so you would have to be using cygwin's sh or perhaps SUA perl. In that case, why aren't you just using system, qx or open?
      Hi,
      Just a minor correction - cmd.exe *does* support 2>&1 (and the like) redirection.

      Cheers,
      Rob
      i am using tool.exe but i just mentioned notepad.exe to give as an example. sorry about that. when i only put tool.exe without putting "> log.txt 2>&1" in Win32::Process::Create() it works fine.

      Also, i can run "tool.exe > log.txt 2>&1" directly from commandline but when i try to use it using Win32::Process::Create() its giving those errors that i mentioned in my initial question.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990107]
help
Chatterbox?
[davido]: when i do get to that point I think I'll do it in a vm snapshot just in case. :)
[oiskuu]: tye, you were right: loginuid/sessionid are part of task struct if compiled with AUDITSYSCALL. I have some doubts if you should actually depend on that feature.
[Corion]: oiskuu: Depends on what you want to do with that information
[tye]: I'm not depending on that feature. But I could in this environment. I'm using getlogin(). shrug
[Corion]: For benign logging (which user started this DB instance), it's OK
[tye]: We use auditd for security monitoring. So we can rely on auditing being enabled. I'm not sure who would want to not be able to audit. Maybe some VM inside another system with audit?
[SuicideJunkie]: spies would want a system to not be able to audit.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-06-23 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (555 votes). Check out past polls.