Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: CGI and System

by perlknight (Pilgrim)
on Feb 18, 2005 at 18:46 UTC ( #432465=note: print w/replies, xml ) Need Help??

in reply to Re: CGI and System
in thread CGI and System

sorry, I have tried this as well.
system("bla blah > /path/blafile &");
this has the same result.

Replies are listed 'Best First'.
Re^3: CGI and System
by tbone1 (Monsignor) on Feb 18, 2005 at 20:02 UTC
    Might I ask what it is you are doing? You might want to examine the command to see if there's a way to spead it up.

    Also, remember that I/O to a device (in this case, a file on a drive) is often the slowest part of a system. I believe that writing to /dev/null rather than an actual file can speed things up if you don't need to store the output. At least, I think it does, or at least did once upon a time. If you can redirect to /dev/null instead, that might help.

    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

      the command is
      arecord <arg...> > /path/record.wav

      open to suggestions on other alternative method of doing this via browser.

Re^3: CGI and System
by Tanktalus (Canon) on Feb 20, 2005 at 17:09 UTC

    Last "try this - I haven't" idea: close stderr, too. Perhaps 2> /dev/null would be about right. Ideally, you'd fork, close stdout and stderr in the child, then exec your command, still in the child. Or, in your case, redirect stdout to a file, close stderr, then exec your command.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://432465]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2023-03-24 19:47 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (61 votes). Check out past polls.