1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

/EXEC's last output line wasn't printed if it didn't contain newline at end

of line.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2395 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-02-06 18:03:58 +00:00 committed by cras
parent f2c78cf482
commit 3a2b45559f

View File

@ -530,12 +530,17 @@ static void cmd_exec(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
static void sig_pidwait(void *pid, void *statusp)
{
PROCESS_REC *rec;
char *str;
int status = GPOINTER_TO_INT(statusp);
rec = process_find_pid(GPOINTER_TO_INT(pid));
if (rec == NULL) return;
/* process exited */
/* process exited - print the last line if
there wasn't a newline at end. */
if (line_split("\n", 1, &str, &rec->databuf) > 0 && *str != '\0')
signal_emit_id(signal_exec_input, 2, rec, str);
if (!rec->silent) {
if (WIFSIGNALED(status)) {
status = WTERMSIG(status);