summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-17 18:05:51 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-17 18:05:51 +0000
commit61a3f9ce2e5b7a22afdc21154d8f0857dba93cd1 (patch)
tree21c8d2b734390ccf10a4bc6cff11592894cd6614
parente61d89d5622cdc4dbd6cfd6a588c649a0d55761c (diff)
downloadATCD-61a3f9ce2e5b7a22afdc21154d8f0857dba93cd1.tar.gz
ChangeLogTag:Wed Jan 17 10:00:42 2001 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLogs/ChangeLog-02a17
-rw-r--r--ChangeLogs/ChangeLog-03a17
-rw-r--r--ace/Handle_Ops.cpp8
-rw-r--r--bin/PerlACE/Process_Unix.pm23
5 files changed, 69 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ec3dad8ca83..8a2714d8d28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Wed Jan 17 10:00:42 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * ace/Handle_Ops.cpp: (handle_timed_open)
+
+ Removed the use of ACE_NONBLOCK on Win32. This use
+ didn't function as expected, since ACE_NONBLOCK would
+ be interpreted as O_WRONLY. Also, the CreateFile API
+ call doesn't support any nonblocking option, so
+ redefining ACE_NONBLOCK would not seem to fix anything.
+
+ * bin/PerlACE/Process_Unix.pm:
+
+ Fixed up the use of the RUNNING state, so wait and kill
+ work properly. Also made Kill automatically use waitpid
+ (since I can't think of any time we'd kill without wanting to
+ clean up the resources).
+
Wed Jan 17 07:44:29 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Log_Msg.h (ACE_Log_Msg): Clarified that only the current message
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index ec3dad8ca83..8a2714d8d28 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,20 @@
+Wed Jan 17 10:00:42 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * ace/Handle_Ops.cpp: (handle_timed_open)
+
+ Removed the use of ACE_NONBLOCK on Win32. This use
+ didn't function as expected, since ACE_NONBLOCK would
+ be interpreted as O_WRONLY. Also, the CreateFile API
+ call doesn't support any nonblocking option, so
+ redefining ACE_NONBLOCK would not seem to fix anything.
+
+ * bin/PerlACE/Process_Unix.pm:
+
+ Fixed up the use of the RUNNING state, so wait and kill
+ work properly. Also made Kill automatically use waitpid
+ (since I can't think of any time we'd kill without wanting to
+ clean up the resources).
+
Wed Jan 17 07:44:29 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Log_Msg.h (ACE_Log_Msg): Clarified that only the current message
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index ec3dad8ca83..8a2714d8d28 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,20 @@
+Wed Jan 17 10:00:42 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * ace/Handle_Ops.cpp: (handle_timed_open)
+
+ Removed the use of ACE_NONBLOCK on Win32. This use
+ didn't function as expected, since ACE_NONBLOCK would
+ be interpreted as O_WRONLY. Also, the CreateFile API
+ call doesn't support any nonblocking option, so
+ redefining ACE_NONBLOCK would not seem to fix anything.
+
+ * bin/PerlACE/Process_Unix.pm:
+
+ Fixed up the use of the RUNNING state, so wait and kill
+ work properly. Also made Kill automatically use waitpid
+ (since I can't think of any time we'd kill without wanting to
+ clean up the resources).
+
Wed Jan 17 07:44:29 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/Log_Msg.h (ACE_Log_Msg): Clarified that only the current message
diff --git a/ace/Handle_Ops.cpp b/ace/Handle_Ops.cpp
index 2820f66c9f1..46e2d2806f4 100644
--- a/ace/Handle_Ops.cpp
+++ b/ace/Handle_Ops.cpp
@@ -18,9 +18,15 @@ ACE_Handle_Ops::handle_timed_open (ACE_Time_Value *timeout,
if (timeout != 0)
{
+#if !defined (ACE_WIN32)
+ // On Win32, ACE_NONBLOCK gets recognized as O_WRONLY so we
+ // don't use it there
+ flags |= ACE_NONBLOCK;
+#endif /* ACE_WIN32 */
+
// Open the named pipe or file using non-blocking mode...
ACE_HANDLE handle = ACE_OS::open (name,
- flags | ACE_NONBLOCK,
+ flags,
perms);
if (handle == ACE_INVALID_HANDLE
&& (errno == EWOULDBLOCK
diff --git a/bin/PerlACE/Process_Unix.pm b/bin/PerlACE/Process_Unix.pm
index d8134dbd0c1..cd519aff697 100644
--- a/bin/PerlACE/Process_Unix.pm
+++ b/bin/PerlACE/Process_Unix.pm
@@ -82,7 +82,7 @@ sub Arguments
if (@_ != 0) {
$self->{ARGUMENTS} = shift;
}
-
+
return $self->{ARGUMENTS};
}
@@ -95,7 +95,7 @@ sub CommandLine ()
if (defined $self->{ARGUMENTS}) {
$commandline .= ' '.$self->{ARGUMENTS};
}
-
+
if ($PerlACE::Process::chorus == 1) {
$commandline = "rsh "
. $PerlACE::Process::chorushostname
@@ -119,12 +119,12 @@ sub Spawn ()
if ($self->{RUNNING} == 1) {
print STDERR "ERROR: Cannot Spawn: <$self->{EXECUTABLE}> ",
"already running\n";
- return -1;
+ return -1;
}
if (!defined $self->{EXECUTABLE}) {
print STDERR "ERROR: Cannot Spawn: No executable specified\n";
- return -1;
+ return -1;
}
FORK:
@@ -148,6 +148,7 @@ sub Spawn ()
print STDERR "ERROR: Can't fork <" . $self->CommandLine () . ">: $!\n";
}
}
+ $self->{RUNNING} = 1;
}
sub WaitKill ($)
@@ -160,9 +161,8 @@ sub WaitKill ($)
if ($status == -1) {
print STDERR "ERROR: $self->{EXECUTABLE} timedout\n";
$self->Kill ();
- # Don't need to Wait since we are on Win32
}
-
+
$self->{RUNNING} = 0;
return $status;
@@ -189,7 +189,6 @@ sub Terminate ()
if ($self->{RUNNING}) {
kill ('TERM', $self->{PROCESS});
- # print STDERR "Process_Unix::Kill 'TERM' $self->{PROCESS}\n";
}
}
@@ -199,17 +198,17 @@ sub Kill ()
if ($self->{RUNNING}) {
kill ('KILL', $self->{PROCESS});
- # print STDERR "Process_Unix::Kill 'TERM' $self->{PROCESS}\n";
+ waitpid ($self->{PROCESS}, 0);
}
+
+ $self->{RUNNING} = 0;
}
sub Wait ()
{
my $self = shift;
- if ($self->{RUNNING}) {
- waitpid ($self->{PROCESS}, 0);
- }
+ waitpid ($self->{PROCESS}, 0);
}
sub TimedWait
@@ -228,4 +227,4 @@ sub TimedWait
return -1;
}
-1;
+1; \ No newline at end of file