sbProcess.h File Reference

Songbird Process Services Definitions. More...

#include <sbMemoryUtils.h>
#include <nsCOMPtr.h>
#include <nsIThread.h>
#include <nsStringGlue.h>
#include <nsTArray.h>
#include <prmon.h>
#include <prproces.h>
Include dependency graph for sbProcess.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sbProcess
 

Functions

 SB_AUTO_NULL_CLASS (sbAutoPRProcessAttr, PRProcessAttr *, PR_DestroyProcessAttr(mValue))
 
 SB_AUTO_NULL_CLASS (sbAutoPRFileDesc, PRFileDesc *, PR_Close(mValue))
 
 SB_AUTO_NULL_CLASS (sbAutoKillProcess, sbProcess *, mValue->Kill())
 
nsresult SB_RunProcess (sbProcess **aProcess, nsTArray< nsString > &aArgList, const nsAString *aStdin=nsnull, PRBool aPipeStdoutString=PR_FALSE, PRMonitor *aDoneMonitor=nsnull)
 

Detailed Description

Songbird Process Services Definitions.

Definition in file sbProcess.h.

Function Documentation

SB_AUTO_NULL_CLASS ( sbAutoPRProcessAttr  ,
PRProcessAttr *  ,
PR_DestroyProcessAttr(mValue)   
)
SB_AUTO_NULL_CLASS ( sbAutoPRFileDesc  ,
PRFileDesc *  ,
PR_Close(mValue)   
)
SB_AUTO_NULL_CLASS ( sbAutoKillProcess  ,
sbProcess ,
mValue->  Kill() 
)
nsresult SB_RunProcess ( sbProcess **  aProcess,
nsTArray< nsString > &  aArgList,
const nsAString *  aStdin,
PRBool  aPipeStdoutString,
PRMonitor *  aDoneMonitor 
)

Start running a new process with the list of command line arguments specified by aArgList. The first entry in the argument list specifies the process executable. The executable argument does not need to be a full path. If aStdin is not null, pipe the string to the process's stdin. If aPipeStdoutString is true, pipe the process's stdout to a string that can be read from the created process. If aDoneMonitor is specified, it is notified when the process is done (due to process exit, an internal error, or a kill request). The new process is returned in aProcess.

Parameters
aProcessReturned created process.
aArgListList of process command line arguments.
aStdinOptional string to use for process stdin.
aPipeStdoutStringIf true, pipe process stdout to a string.
aDoneMonitorOptional monitor to notify when process is done.

Definition at line 677 of file sbProcess.cpp.

Here is the call graph for this function: