You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From datacamp-content/courses-introduction-to-shell#131: if the user types cat > output.txt instead of cat input.txt > output.txt, the command hangs up waiting for user input. We ask them to do something like this at one point in order to teach them how to use ^C to stop programs, but their ^C isn't passed to the SCT, so we have no way to check if they used it or not.
The text was updated successfully, but these errors were encountered:
From glancing at the exercise, which is titled "How can I stop a running program?", it seems like one alternative is that the exercise starts a running program in the PEC. Then, any student that stops it (causing the SCT to run) has successfully stopped a running program.
In bash specific language, it sounds like this question is asking how to tell a student has sent the SIGINT signal. So if that's the goal, then running a program that only closes for SIGINT seems like it would do it.
If you really didn't want to run a program in PEC, you could run PEC to trap SIGINT:
@gvwilson commented on Thu May 17 2018
From datacamp-content/courses-introduction-to-shell#131: if the user types
cat > output.txt
instead ofcat input.txt > output.txt
, the command hangs up waiting for user input. We ask them to do something like this at one point in order to teach them how to use^C
to stop programs, but their^C
isn't passed to the SCT, so we have no way to check if they used it or not.The text was updated successfully, but these errors were encountered: