Consultor Eletrônico



Kbase P171955: How does Progress process an OUTPUT THROUGH VALUE("lp .....") command on UNIX platforms?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/08/2010
Status: Unverified

GOAL:

How does Progress process an OUTPUT THROUGH VALUE("lp .....") command on UNIX platforms?

FACT(s) (Environment):

OpenEdge Category: Language (4GL/ABL)
Progress 9.x
OpenEdge 10.x
UNIX

FIX:

When the 4GL encounters an OUTPUT THROUGH VALUE("lp .........") command on a UNIX platform we handle it in the following manner:

1) We call the system call pipe() to create a communication pipe that will be used with a forked process
2) We call fork() to create a child process
3) The child process then calls execl() to spawn the process.

We use the user shell defined in the SHELL environment variable or if the SHELL environment variable is not set we use "/bin/sh".

We don't pass environment variables. The execl() function uses the current environment variables from the calling process to pass to the new process.