YASH 0.1
CLI written in C
Loading...
Searching...
No Matches
signals.c File Reference

Signal handling functions for the YASH shell. More...

Functions

void sigchld_handler (int sig)
 SIGCHLD handler.
 
void sigint_handler (int sig)
 SIGINT handler (Ctrl-C)
 
void sigtstp_handler (int sig)
 SIGTSTP handler (Ctrl-Z)
 
void setup_signal_handlers (void)
 Setup signal handlers for SIGINT, SIGTSTP, and SIGCHLD.
 

Variables

volatile sig_atomic_t child_status_changed = 0
 Flag indicating that a child process status has changed.
 
pid_t foreground_pgid = 0
 Process group ID of the current foreground process.
 

Detailed Description

Signal handling functions for the YASH shell.

Author
Nathan Lemma
Date
09-16-2025

This file contains the signal handling functions for the YASH shell.

Function Documentation

◆ sigchld_handler()

void sigchld_handler ( int sig)

SIGCHLD handler.

Parameters
sigSignal number

◆ sigint_handler()

void sigint_handler ( int sig)

SIGINT handler (Ctrl-C)

Parameters
sigSignal number

◆ sigtstp_handler()

void sigtstp_handler ( int sig)

SIGTSTP handler (Ctrl-Z)

Parameters
sigSignal number