stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <>
Subject Re: [patch] exec utility windows port
Date Thu, 17 Aug 2006 20:41:56 GMT

Now that the preparation patch has been applied, I have updated the 
actual port patch to reflect the current state of subversion.  This 
patch is attached.  Below is the revised changelog which should reflect 
the changes made in this iteration of the patch.

A concern I have about this patch is in the behavior of the soft kill 
logic.  When I test the child process kill logic (by issuing a command 
like 'exec.exe -t3 "exec.exe --sleep=10"'), I receive error output 
similar to the following:
 > Sending child process Control-C failed with error 87.  Additionally, 
FormatMessage failed with error 8.
 > Sending child process Control-Break failed with error 87. 
Additionally, FormatMessage failed with error 8.
 From these error messages, I believe that the soft kills aren't being 
sent to the child process, and I am uncertain as to the reason.  I would 
appreciate it if someone who has more experience with Windows could look 
into the problem.  I don't know if this is a big enough issue to stop 
the patch from going in as it stands, as we are able to hard kill 
processes, but it is something to consider first.

--Andrew Black

	* exec.h [_WIN32 || _WIN64] (exec_attrs): Alter structure definition 
for windows.
	* exec.cpp [_WIN32 || _WIN64]: Use windows.h and process.h in place of 
unistd.h and sys/wait.h on windows.
	  [!_WIN32 && !_WIN64] (handle_alrm, wait_for_child, open_input, 
replace_file, exec_file): Reduce scope of (existing) functions to 
non-windows platforms only.
	  [_WIN32 || _WIN64] (open_input, merge_argv, warn_last_error, 
exec_file): Define implementation of named functions for windows 
platforms only.
	* cmdopt.cpp [_WIN32 || _WIN64]: Use windows.h in place of unistd.h on 
	  (escape_code, default_path_sep, suffix_sep, exe_suffix_len): Alter 
values for windows.
	  (rw_sleep, rw_signal): Define platform independent wrapper for 
sleep/Sleep and sigaction/signal.
	  (eval_options): Use above.
	* runall.cpp [!_WIN32 && !_WIN64]: Don't include sys/wait.h on windows.
	  (S_IXUSR, S_IXGRP, S_IXOTH): Define values if undefined (for windows).
	  (check_target_ok) [_WIN32 || _WIN64]: Make object file comparison 
operating system specific.
	  (process_results) [_WIN32 || _WIN64]: Make error state processing 
code operating system specific.
	  (rw_basename) [_WIN32 || _WIN64]: Treat / as an additional path 
separator on windows.

Martin Sebor wrote:
> Andrew Black wrote:
>> I believe I posted my patch to the list prior to the referenced change 
>> being submitted to subversion, but I am uncertain why those particular 
>> hunks failed to apply (running svn up appears to have merged them 
>> without conflicts).
>> Attached is a revised version of the patch that tries to address the 
>> formatting issues in changed code (a formatting and comment cleanup 
>> sweep is needed after the windows port is finished).  I have also 
>> tried to alter the log based on the changes to the patch and the 
>> referenced link.
> Great, thank you! Applied as follows:
> Martin

View raw message