Changeset 5844:6111f08378d3 in roaraudio


Ignore:
Timestamp:
01/07/13 13:09:42 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test return value of _spawnlp()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r5843 r5844  
    137137 
    138138 snprintf(buf, sizeof(buf), "%i", port); 
    139  // TODO: FIXME: check for error here: 
    140  _spawnlp(MODE, daemonimage, daemonimage, "--tcp", "--bind", "localhost", "--port", buf, (const char*)NULL); 
     139 roar_err_clear_all(); 
     140 if ( _spawnlp(MODE, daemonimage, daemonimage, "--tcp", "--bind", "localhost", "--port", buf, (const char*)NULL) < 0 ) { 
     141  roar_err_update(); 
     142  ROAR_ERR("_start_server_win32(server='%s', ...): Can not start server: %s: %s", server, daemonimage, roar_errorstring); 
     143  return -1; 
     144 } 
    141145 
    142146 snprintf(buf, sizeof(buf), "localhost:%i", port); 
Note: See TracChangeset for help on using the changeset viewer.