How to make Ctrl-Z work with xterm -e "ping localhost"

there will be a child process but how to pass the Ctrl-Z to that process?
I tried Ctrl-C and S and Q they are working fine...

Recommended Answers

All 3 Replies

Why do you need Ctrl-Z? You could simply add -c #, where # is the number of count, to your ping to automatically stop, and that would automatically close your X terminal.

ping is just an easy example, I need Ctrl-Z working for other command as well.

Well, not realy a solution with CTRL-Z or a beauty contest winner;

to run the command:
xterm -T unique_name -e ping 192.168.1.1 &

to quit the command:
pkill -f "unique_name"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.