extreme care is needed if signals and threads are used in the same program currentlyonly the main thread of execution can set new signal handlers or receive signals signal handling on windows is of only limited functionality the number of supported signals is extremely limited on this platform subprocess the subprocess module contains functions and objects that generalize the task of creating new processescontrolling input and output streamsand handling return codes the module centralizes functionality contained in variety of other modules such as ospopen and commands popen(args**parmsexecutes new command as subprocess and returns popen object representing the new process the command is specified in args as either stringsuch as 'ls - 'or as list of stringssuch as ['ls''- 'parms represents collection of keyword arguments that can be set to control various properties of the subprocess the following keyword parameters are understoodkeyword description bufsize specifies the buffering behaviorwhere is unbuffered is line-buffereda negative value uses the system defaultand other positive values specify the approximate buffer size the default value is if trueall file descriptors except and are closed prior to execution of the child process the default value is false specifies process-creation flags on windows the only flag currently available is create_new_console the default value is the directory in which the command will execute the current directory of the child process is changed to cwd prior to execution the default value is nonewhich uses the current directory of the parent process dictionary of environment variables for the new process the default value is nonewhich uses the environment variables of the parent process specifies the name of the executable program to use this is rarely needed because the program name is already included in args if shell has been giventhis parameter specifies the name of the shell to use the default value is none specifies function that will be called in the child process just before the command is executed the function should take no arguments if truethe command is executed using the unix shell like the os system(function the default shell is /bin/shbut this can be changed by also setting executable the default value of shell is none close_fds creation_flags cwd env executable preexec_fn shell lib fl ff