


     popen(XOPEN.os/genuRelease	4.4.1 (UniSoft Lpopen(XOPEN.os/genuts)



     NAME
	  XOPEN.os/genuts/popen	- initiate pipe	to/from	a process
	  testset

     DESCRIPTION
	  Popen	tests the popen() subroutine call interface for
	  conformance to the XSI System	Interfaces Page:popen()

     TESTS
     Compliance
	  1    When type = w popen() returns a pointer to a stream
	       that can	be used	to write to the	standard input of the
	       command specified by command.

	  2    When type = r popen() returns a pointer to a stream
	       that can	be used	to read	from the standard output of
	       the command specified by	command.

	  3    If command cannot be executed then a read or write to
	       the stream will fail.
	       This test is executed in	XPG3 mode only.

	  4    When a call to popen() completes	successfully, then
	       both the	parent and the child process are capable of
	       executing independently before either terminates.
	       Not tested in XPG3 mode.

	  5    A call to popen() executes the command specified	by the
	       string pointed to by command in the same	manner as
	       would occur in a	process	created	by a call to fork()
	       followed	by a call to execl(<shell path>, "sh", "-c",
	       command,	(char *)0).
	       Not tested in XPG3 mode.

     Deviance
	  6    popen() returns a null pointer if a stream cannot be
	       created in the calling process.

	  7    When a pipe cannot be created, then a call to popen()
	       returns a NULL pointer.
	       Not tested in XPG3 mode.

	  8    When a subprocess cannot	be created, then a call	to
	       popen() returns a NULL pointer.
	       Not tested in XPG3 mode.

	  9    If the implementation detects EINVAL: when the mode
	       argument	is invalid, then a call	to popen() returns
	       NULL and	sets errno to EINVAL.
	       Not tested in XPG3 mode.

     OUTPUTS



     Page 1					    (printed 2/21/103)






     popen(XOPEN.os/genuRelease	4.4.1 (UniSoft Lpopen(XOPEN.os/genuts)



     Tests:
	  1-2  Pass/Fail indication - failure information includes
	       expected	and detected data transferred through pipe.

	  3-5  Pass/Fail indication only.

	  6-8  Pass/Fail indication - failure information includes
	       expected	and detected return values.

	  9    Pass/Fail indication - failure information includes
	       expected	and detected errno and return values.

     PARAMETERS
	  1    VSX_INVALID_POPEN_MODE :	An invalid mode	argument for
	       popen(),	set to "unsup" if popen() does not detect
	       EINVAL errors.  Used in test 9.

     RELEASE
	  4.4.1	(06/09/97)




































     Page 2					    (printed 2/21/103)



