open2(), win2k, perl5.6.1, Win32::Daemon

A

Andre Warnier

Help requested, probably from a Win2K/ActivePerl specialist :

I wrote a program which starts up another process via an open2() call
and writes commands and reads answers to that other process's STDIN &
STDOUT.
That program runs under ActivePerl 5.6.1 build 633, both under Unixes
and under Win32, and can run in both "daemon" mode (service under Win32)
and on a terminal (console under Win32) for debugging.
(Under Win32, it uses Win32::Daemon to run as a Service).
The program has been running fine for about a year under various
platforms and circumstances. Specifically, the exact same code runs
under Unix(es) both as a daemon and on a terminal, it runs under Windows
NT 4.0 both as a Service and on a console, and it runs under Windows
2000 on the console. The only case in which it doesn't run properly is
under Windows 2000 as a service.

In this last case, the program fails when trying to start the external
process via the open2() call, with the following error message :
"open2: Can't call method "close" on an undefined value at
c:/Perl/lib/IPC/Open3.pm line 327." and does not start the external program.
The user-id under which it tries to run as a service under Win2k is not
Administrator, but is a member of the Administrators group, and has the
"run as service" permission. The Win2k service starts up fine, the
program starts to run, only this open2() call fails. The program
catches the error and recovers and continues to run, but each time it
tries this open2(), it fails with the same message, thus the external
program never gets started.

My questions would thus be :
1) Is there a specific problem known with the open2() call with
ActivePerl 5.6.1 build 633 under Win2k that would explain the above ?
2) If not, I suspect some kind of Win2k "user privileges" question may
be the cause. Does anyone have any information (or suspicions) about this ?

Thanks in advance,
Andre Warnier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top