Changeset 13752


Ignore:
Timestamp:
Jan 4, 2013, 1:48:35 AM (8 years ago)
Author:
jordan
Message:

(libT) #4633 'if executing the torrent-done script fails, log an error' -- done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r13722 r13752  
    19891989
    19901990#ifdef WIN32
    1991         _spawnvpe (_P_NOWAIT, script, (const char*)cmd, env);
     1991        if (spawnvpe (_P_NOWAIT, script, (const char*)cmd, env) == -1)
     1992          tr_torerr (tor, "error executing script \"%s\": %s", cmd[0], tr_strerror (errno));
    19921993#else
    19931994        signal (SIGCHLD, onSigCHLD);
     
    19971998            for (i=0; env[i]; ++i)
    19981999                putenv (env[i]);
    1999             execvp (script, cmd);
     2000
     2001            if (execvp (script, cmd) == -1)
     2002              tr_torerr (tor, "error executing script \"%s\": %s", cmd[0], tr_strerror (errno));
     2003
    20002004            _exit (0);
    20012005        }
Note: See TracChangeset for help on using the changeset viewer.