[tor-bugs] #2046 [Tor Client]: Port Tor code for starting a background process to Windows

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Aug 30 14:11:11 UTC 2011


#2046: Port Tor code for starting a background process to Windows
------------------------+---------------------------------------------------
 Reporter:  sjmurdoch   |          Owner:  sjmurdoch         
     Type:  task        |         Status:  needs_review      
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:  #1983             
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
Changes (by sjmurdoch):

  * status:  accepted => needs_review


Comment:

 OK, I believe I have addressed all of these issues, and the code is ready
 for review. FYI, the code you previously reviewed was 1da5081. Changes
 since then are:


 > '''Fix:'''
 >
 > Split the C string processing stuff out of functions like
 log_from_handle, so
 > that we can do a unit test for it.  (If there's other string processing
 goop in
 > the spawn code, same logic applies).

 https://gitweb.torproject.org/sjm217/tor.git/commit/da34360952c0fbbd8effc2789ed72b86c8045531

 > Pass pointer to process_handle_t into tor_spawn_background, rather than
 it
 > return a process_handle_t.

 https://gitweb.torproject.org/sjm217/tor.git/commitdiff/3f0a197aad3cca6634e4eb63e8441e5507a6b77f

 > Have a separate, unit-tested function, that formats a command line
 properly for
 > windows.  It should handle filenames with a space (e.g.  C:\Program
 Files\);
 > also it should handle internal quotes. Look at Python's
 subprocess.list2cmdline
 > and at http://msdn.microsoft.com/en-us/library/ms880421

 https://gitweb.torproject.org/sjm217/tor.git/commit/bc97f410802d5b9c66bfba6aebeae1ecd70f8857

 > For tor_get_exit_code: Let's return a define or an enum rather than a
 magic
 > tristate.

 https://gitweb.torproject.org/sjm217/tor.git/commit/f1ff65dfad800ed89e5b01c1c5b4b77c10a438b8

 > In tor_read_all_from_handle, I'd be more comfortable if it did an
 > tor_assert(byte_count + numread <= count);

 https://gitweb.torproject.org/sjm217/tor.git/commit/93792b5aa6806646674795504419f3e97862685c

 > '''Document and possibly fix:'''
 >
 > In tor_log_from_handle: handle strings with embedded NULs; handle
 strings > 255 bytes (without splitting lines or outputting bogus
 newlines). See bug #2045.

 https://gitweb.torproject.org/sjm217/tor.git/commit/d1dd9991cd636bafe7543aea4dbb18de69f26202

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2046#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list