Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:30:25+00:00 2026-06-10T20:30:25+00:00

I need a script that runs ‘A’ and send to it a signal that

  • 0

I need a script that runs ‘A’ and send to it a signal that should terminate it, and I need to iterate that with different signals so what I want basically is

Launch A ->
send signal S to terminate A and check stuff ->
Relaunch A ->
send signal S1 ......

My problem is that in A I’ve a loop like:

while(1){
    scanf()
    ...DO STUFF...
}

So using a script like

./A arguments
kill -s QUIT A'sPid

won’t work, because obviously it will not reach the kill line until A’s over, and it won’t without a signal or user input.

Can you give me any hint? Thanks, and sorry if it’s a banal question, but I’ve just started learning this stuff.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:30:27+00:00Added an answer on June 10, 2026 at 8:30 pm

    You need to put the A instance into the background (see this), so that as it runs you can do something else, namely, send it a signal using kill.

    To background a process put an & at the end, i.e.:

    ./A arguments &
    

    Once the background process is started the script will move on to the next command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here's the scenario. I've got a script that runs some tests. I need
I want to create cron job that runs a script every 5 seconds. Seeing
I'm writing a Perl script that runs 4 simultaneous, identical processes with different input
I want to write one script that runs on every apge--that uses the jquery
I've got a basic php script that runs perfect in a browser. I want
I've got a script that runs in PhantomJS on my server that I need
I have a php script that runs on unix but I need it to
I need to create an RPM package from an ANT script that runs on
I want to write a Python script that runs another program, reading the output
I need a script that will test an input field's contents to see if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.