|
in qp2runpase how can you set the fdmap ?
Qp2RunPase() runs in the same job as the caller, so there's no such thing as an fdmap. You need to use spawn() to create a new job. When you create a new job, the descriptors need to be mapped so that the current job's pipes are connected to the spawned job's stdin,stdout and stderr. Then, in the spanwed job, run the Qp2RunPase() API, or simply spawn the QP2SHELL program in the first place.
It's difficult to explain, so I've written a sample program that you can look at. Hopefully the code will make it easier to understand what I mean. You can get the code at the following link:
http://www.scottklement.com/rpg/SpawnPase.zip
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.