PSF and CREATE_NEW_PROCESS_GROUP

%3CLINGO-SUB%20id%3D%22lingo-sub-3354179%22%20slang%3D%22en-US%22%3EPSF%20and%20CREATE_NEW_PROCESS_GROUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3354179%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20application%20RStudio%20has%20issues%20when%20packaged%20together%20with%26nbsp%3B%20R%20(the%20launguage).%26nbsp%3B%20It%20is%20known%20that%20R%20requires%20the%20PSF%20along%20with%20FileRedirectionFixup%20to%20operate%20and%20works%20quite%20well.%20Therefore%20in%20this%20package%20with%20both%20components%2C%20the%20PsfLauncher%20is%20being%20used%20to%20launch%20RStudio's%20primary%20application%2C%20RGUI.exe%2C%20which%20is%20an%20x64-bit%20Windows32%20App.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERGUI%20subsequently%20launches%20rconsole.exe%20which%20is%20a%2064-bit%20console%20app.%26nbsp%3B%20When%20it%20makes%20the%20CreateProcess%20call%20(intercepted%20by%20PsfRuntime)%2C%20the%20dwflags%20parameter%20includes%20CREATE_NEW_PROCESS_GROUP.%26nbsp%3B%20PsfRuntime%20intercept%20creates%20this%20process%20as%20suspended%20(along%20with%20the%20requested%20flags)%2C%20and%20then%20injects%20PsfRunTimeX64.dll%20into%20the%20new%20process%20before%20allowing%20the%20new%20process%20to%20resume.%26nbsp%3B%20Although%20we%20can%20see%20that%20the%20DLL%20was%20successfully%20injected%2C%20the%20dll%20is%20unable%20to%20properly%20initialize%20as%20no%20debug%20output%20appears%20in%20the%20debug%20console%20port.%26nbsp%3B%20Subsequently%2C%20rconsole%20does%20not%20get%20the%20required%20fixups%20and%20fails%20to%20locate%20the%20required%20dlls%20from%20in%20the%20package.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20documentation%20on%20CREATE_NEW_PROCESS_GROUP%20was%20written%20long%20before%20the%20container%2C%20and%20does%20not%20provide%20information%20on%20any%20relationship%20between%20process%20groups%2C%20Jobs%2C%20or%20containers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIs%20such%20a%20program%20supported%20in%20the%20container%2FPSF%3C%2FSTRONG%3E%2C%20meaning%20that%20the%20PSF%20might%20need%20adjustments%2C%20or%20is%20this%20something%20that%20just%20can't%20be%20done%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

The application RStudio has issues when packaged together with  R (the launguage).  It is known that R requires the PSF along with FileRedirectionFixup to operate and works quite well. Therefore in this package with both components, the PsfLauncher is being used to launch RStudio's primary application, RGUI.exe, which is an x64-bit Windows32 App.

 

RGUI subsequently launches rconsole.exe which is a 64-bit console app.  When it makes the CreateProcess call (intercepted by PsfRuntime), the dwflags parameter includes CREATE_NEW_PROCESS_GROUP.  PsfRuntime intercept creates this process as suspended (along with the requested flags), and then injects PsfRunTimeX64.dll into the new process before allowing the new process to resume.  Although we can see that the DLL was successfully injected, the dll is unable to properly initialize as no debug output appears in the debug console port.  Subsequently, rconsole does not get the required fixups and fails to locate the required dlls from in the package.

 

The documentation on CREATE_NEW_PROCESS_GROUP was written long before the container, and does not provide information on any relationship between process groups, Jobs, or containers.

 

Is such a program supported in the container/PSF, meaning that the PSF might need adjustments, or is this something that just can't be done?

0 Replies