diff -Nru usplash-0.5.19/debian/changelog usplash-0.5.19ubuntu1/debian/changelog --- usplash-0.5.19/debian/changelog 2008-03-31 12:14:15.000000000 +0200 +++ usplash-0.5.19ubuntu1/debian/changelog 2008-09-06 23:18:18.000000000 +0200 @@ -1,3 +1,11 @@ +usplash (0.5.19ubuntu1) intrepid; urgency=low + + * Apply Patch from Jan-Marek Glogowski + fixed Problem with segfaults on shutdown + (lp:#259761) + + -- Martin Kaufmann Sat, 06 Sep 2008 23:16:55 +0200 + usplash (0.5.19) hardy; urgency=low * debian/usplash.postinst: Add instructions about update-initramfs in diff -Nru usplash-0.5.19/usplash.c usplash-0.5.19ubuntu1/usplash.c --- usplash-0.5.19/usplash.c 2008-03-10 22:38:02.000000000 +0100 +++ usplash-0.5.19ubuntu1/usplash.c 2008-09-06 23:16:47.000000000 +0200 @@ -155,6 +155,7 @@ static int main_loop(void) { struct timeval tv; + int ret = 0; for (;;) { fd_set rfds; @@ -170,24 +171,28 @@ if (retval < 0 && errno != EINTR) { /* Error */ - return 1; + ret = 1; + break; } else if (retval < 0 && errno == EINTR) { /* Count cycles for timeout */ cycles++; if (cycle_timeout && cycles >= cycle_timeout) - return 0; + break; } else if (retval > 0) { /* Data available */ - int ret; cycles = 0; ret = read_command(); if (ret) - return ret; + break; } } - /* Not reached */ - return 0; + /* Disable pulsating on shutdown, otherwise SIGALRM / animate_step + * will likely crash usplash + */ + pulsating = 0; + + return ret; } static int read_command(void)