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

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun Aug 28 19:54:02 UTC 2011


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

  * status:  needs_review => accepted


Comment:

 For my benefit, and perhaps others, here's the IRC [comment:6 log above]
 as a TODO list:

 '''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).

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

 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

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

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

 '''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.

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


More information about the tor-bugs mailing list