Unix/Linux Go Back    

Linux 2.6 - man page for dpkg::ipc (linux section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

Dpkg::IPC(3)				   libdpkg-perl 			     Dpkg::IPC(3)

       Dpkg::IPC - helper functions for IPC

       Dpkg::IPC offers helper functions to allow you to execute other programs in an easy, yet
       flexible way, while hiding all the gory details of IPC (Inter-Process Communication) from

	   Creates a child process and executes another program in it.	The arguments are
	   interpreted as a hash of options, specifying how to handle the in and output of the
	   program to execute.	Returns the pid of the child process (unless the wait_child
	   option was given).

	   Any error will cause the function to exit with one of the Dpkg::ErrorHandling


	       Can be either a scalar, i.e. the name of the program to be executed, or an array
	       reference, i.e. the name of the program plus additional arguments. Note that the
	       program will never be executed via the shell, so you can't specify additional
	       arguments in the scalar string and you can't use any shell facilities like

	       Mandatory Option.

	   from_file, to_file, error_to_file
	       Filename as scalar. Standard input/output/error of the child process will be
	       redirected to the file specified.

	   from_handle, to_handle, error_to_handle
	       Filehandle. Standard input/output/error of the child process will be dup'ed from
	       the handle.

	   from_pipe, to_pipe, error_to_pipe
	       Scalar reference or object based on IO::Handle. A pipe will be opened for each of
	       the two options and either the reading ("to_pipe" and "error_to_pipe") or the
	       writing end ("from_pipe") will be returned in the referenced scalar. Standard
	       input/output/error of the child process will be dup'ed to the other ends of the

	   from_string, to_string, error_to_string
	       Scalar reference. Standard input/output/error of the child process will be
	       redirected to the string given as reference. Note that it wouldn't be strictly
	       necessary to use a scalar reference for "from_string", as the string is not
	       modified in any way. This was chosen only for reasons of symmetry with "to_string"
	       and "error_to_string". "to_string" and "error_to_string" imply the "wait_child"

	       Scalar. If containing a true value, wait_child() will be called before returning.
	       The return value will of spawn() will be a true value, but not the pid.

	       Scalar. Option of the wait_child() call.

	       Scalar. Option of the wait_child() call.

	       Scalar. The child process will chdir in the indicated directory before calling

	   env Hash reference. The child process will populate %ENV with the items of the hash
	       before calling exec. This allows exporting environment variables.

	       Array reference. The child process will remove all environment variables listed in
	       the array before calling exec.

	   Takes as first argument the pid of the process to wait for.	Remaining arguments are
	   taken as a hash of options. Returns nothing. Fails if the child has been ended by a
	   signal or if it exited non-zero.


	       String to identify the child process in error messages.	Defaults to "child

	       If true do not check the return status of the child (and thus do not fail it it
	       has been killed or if it exited with a non-zero return code).

	       Set a maximum time to wait for the process, after that fail with an error message.

       Written by Raphael Hertzog <hertzog@debian.org> and Frank Lichtenheld <djpig@debian.org>.

       Dpkg, Dpkg::ErrorHandling				    2012-04-17				     Dpkg::IPC(3)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 02:41 AM.