On Sun, Feb 22, 2015 at 11:22 PM, Stuart Henderson <[email protected]> wrote: > http://svnview.digium.com/svn/asterisk/branches/13/res/res_agi.c?view=markup#l1828 > http://svnview.digium.com/svn/asterisk/branches/13/main/app.c?view=markup#l2904 > > I've given it a bit of a poke with added logging in Asterisk but > not getting very far there, either I'm doing something wrong with > my ast_log(..) additions, or the if (!pid) block after line 1893 > in res_agi.c isn't getting run at all.
Here is the analysis of codepath for 'System'. 'System' itself is in apps/app_system.c and calling ast_safe_system from main/asterisk.c. http://svnview.digium.com/svn/asterisk/branches/11/apps/app_system.c?view=markup#l131 http://svnview.digium.com/svn/asterisk/branches/11/main/asterisk.c?view=markup#l1099 I modified chunk at http://svnview.digium.com/svn/asterisk/branches/11/main/asterisk.c?view=markup#l1136 to be if (res > -1) { ast_log(LOG_WARNING, "WIFCONTINUED = %d\n", WIFCONTINUED(status)); ast_log(LOG_WARNING, "WIFEXITED = %d\n", WIFEXITED(status)); ast_log(LOG_WARNING, "WIFSIGNALED = %d\n", WIFSIGNALED(status)); ast_log(LOG_WARNING, "WIFSTOPPED = %d\n", WIFSTOPPED(status)); ... and here is the result: 5.6 -- Executing [XXXXXXXXXX@from-trunk:3] System("SIP/test-145-00000000", "/bin/pwd") in new stack [Feb 23 23:06:55] WARNING[-1][C-00000000]: asterisk.c:1135 ast_safe_system: WIFCONTINUED = 0 [Feb 23 23:06:55] WARNING[-1][C-00000000]: asterisk.c:1136 ast_safe_system: WIFEXITED = 1 [Feb 23 23:06:55] WARNING[-1][C-00000000]: asterisk.c:1137 ast_safe_system: WIFSIGNALED = 0 [Feb 23 23:06:55] WARNING[-1][C-00000000]: asterisk.c:1138 ast_safe_system: WIFSTOPPED = 0 5.7 -- Executing [XXXXXXXXXX@from-trunk:3] System("SIP/test-145-00000000", "/bin/pwd") in new stack [Feb 23 23:08:00] WARNING[-1][C-00000000]: asterisk.c:1135 ast_safe_system: WIFCONTINUED = 0 [Feb 23 23:08:00] WARNING[-1][C-00000000]: asterisk.c:1136 ast_safe_system: WIFEXITED = 0 [Feb 23 23:08:00] WARNING[-1][C-00000000]: asterisk.c:1137 ast_safe_system: WIFSIGNALED = 1 [Feb 23 23:08:00] WARNING[-1][C-00000000]: asterisk.c:1138 ast_safe_system: WIFSTOPPED = 0 [Feb 23 23:08:00] WARNING[-1][C-00000000]: app_system.c:134 system_exec_helper: Unable to execute '/bin/pwd' Boom! Child signaled and never executed. Any ideas?
