shithub: rc

Download patch

ref: ab2af6895d0e66aa9e5a94f77c2ba132c08f28d8
parent: a827beee910cb143f916cf3657c45c29d904800c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Apr 12 16:09:07 EDT 2025

don't exit on SIGWINCH when theres no handler (thanks nepomuk)

Theres always a race when rc starts up and there is no
fn sigwinch { ... } function defined yet and someone
resizes the terminal window. So just make the default
action for sigwinch to ignore it instead.

--- a/trap.c
+++ b/trap.c
@@ -29,6 +29,9 @@
 			 */
 			while(!runq->iflag) Xreturn();
 		}
+		else if(strcmp(trapreq->name, "sigwinch") == 0){
+			/* ignore if theres no handler */
+		}
 		else Exit();
 	}
 }