Resolved Question Is it possible to make a batch file ignore the taskkill command? cd / Taskkill /f /t /im cmd.exe is the command, I use from command prompt to close any batch file I have running, but, is there a way for a batch file to ignore this command and keep running? I'm new to this, sorry for the layman's language :) Best Answer - Chosen by Asker I dont know about Windows. But in Unix/Linux, we use a command known as trap. Usually when we press key sequences such as CTRL+C etc, the process gets a signal known as SIG_INT. For every signal there will be an associated default action which will be executed when that signal arrives to the process. If we want our process to ignore that signal then we use trap command. Usually for every signal there will be an associated integer number known as signal number. For instance SIG_INT it is 2. Now, if we want a rpogram to ignore this we use trap 'echo sorry' 2 Which indicated that when signal 2 is received the process will be execution echo sorry command rather than termination. This is called as signal handling.