Can I send a signal to a process?

In java, a process is started, then I want sent a ^C signal to this process, but with the javadoc, there are only destroy() can use. How can I do ?
thanks
Message was edited by:
LizhiWang

Don't crosspost.
http://forum.java.sun.com/thread.jspa?threadID=774989

Similar Messages

  • How I can send a signal to a process

    I use a Process.start() to run a extenal program, then I want to send a signal, such as ^C etc to this program.
    The process class is too simple to do this.
    How can I do this?
    thank

    I use a Process.start() to run a extenal program,
    then I want to send a signal, such as ^C etc tothis
    program.
    The process class is too simple to do this.
    How can I do this?If Process is too simple: JNIThanks first.
    I tried to use JNI. But I can't get the native Output/Error output.
    How can I get the native's Output? Or is there a method like Process.getInputStream()/getErrorStream()?
    thanks

  • How can i send digital signal through IO card to a trigger box

    digitial io card

    Please elaborate on the DIO card you are using, what programming environment, and further details about your application, system, platform, operating system, etc.
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • Sending a signal to an exec'ed process

    I have wrtitten java code to Runtime.exec the dbx debugger on solaris and I am happily interacting with it thru the Process input/output objects.
    What I now need to is send the signal SIGINT to that process to cause the dbx interrupt.
    What is the best way of sending signals to processes from a java app ?
    Thanks,
    Neil

    What is the best way of sending signals to processes from a java app ?
    Runtime.getRuntime().exec("kill -2 " + pid);Oh, wait, you say: how to get the PID? Now that gets a bit more complicated. You'll have to either exec "ps" and read the output, or resort to some other trickery, like having your child process write its PID to stdout and reading that into the parent.
    (The latter can be done by wrapping the child in a shell process which echoes $$ and then exec's your real process).
    All grotty, I know, but then Java only exposes functionality that can be portably implemented on all OSes, and you can't do any of this stuff on Windows (no concept of "child" or "parent" processes, or interrupt signals, or dbx, or anything..)

  • How can i send more than one signal to DMA FIFO?

    Hello,
    I'm trying to send more than one signal to DMA FIFO, but i don't know how to do. When i send one signal i don't have problems. I try to use one block DMA FIFO for one signal. For example if i have 3 signal i use · DMA FIFO but whe i want to wath them in a waveform chart the signals have a delay.
    How can I do to send more than one signal to DMA FIFO? and if that's no posible, How i can do for syncronizate the 3 signals?
    The data type of the signal is FXP <16,10>
    Regards.
    Pablo
    Solved!
    Go to Solution.
    Attachments:
    Block Diagram.jpg ‏81 KB
    Block Diagram.jpg ‏81 KB

    Not quite.  You need to use the Integer To Fixed Point Cast to change from the integers to your FXP numbers.  You can then build them into a cluster to write to the Waveform Chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Combine and Decode FXP.png ‏14 KB

  • My iPhone4 loses signal and when I do hard reset, I can't send or receive SMS and calls. I have to back-up and restore weekly!

    It started last month before I ungraded to iOS5. So my network provider advised me to upgrade. It fixed the problem but it happens again after several days. I lose signal then when I do hard reset, signal is back but I can't send or receive SMS or make and receive calls. But from the other end my phone is ringing but nothing is happening to my phone.This is really frustrating! Coz it happens weekly and the only way to fix it is to back-up and restore. Which is a hassle coz it takes me about 3 hours! Please help. My phone is still under warranty but the provider is telling me it might take them 3 months to check and fix.
    I think there is a bug with the iOS5 coz it happen when it I upgraded. Before I was quite happy with my iPhone4 but now it has become a source of anxiety and stress. I've received a lot of complaints at work coz they couldn't contact me.

    Try to set it up as new device without using the last backup: How to back up your data and set up as a new device

  • Can you Send for Shared Review in Batch Processing JavaScript?

    Hello! I am new to javascript and Acrobat 9 Pro. I have multiple documents emailed to me in a day and need to send/track each one individually. Can this be done using the Batch Processing javascript as a Shared Review?
    I have tried adding a button to the "Add-On" toolbar and start a shared review but can't automate manual key entries for the dialog windows that opens for  a Shared Review.
    What I am looking for is a js file to add a button to execute Send for Shared Review, Select multiple files dialog window, open the standard dialog windows for Shared Reviews one time and then do the same to all other selected files.
    Can you please help, and maybe supply some javascript examples?

    Please repost in the Acrobat Scripting forum.

  • How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.

    How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.
    What I'm looking to do is to have self powered in ceiling speakers in every room in my house with out having to run wires to every room to carry the audio signal. I would like to use the airport express to do the job of carting the audio signal.
    Here's my set up now I have an airport extreme and one airport express that I use to carry audio to one room.

    FWIW. I have used up to four AirPort Express Base Stations (AX) for streaming sucessfully in pretty much the way you have described. I didn't have a need to try more so I can't attest that more would or would not work.

  • I have full signal and have wifi but I'm can't send messages or receive them. I can't make phone calls either.

    HI
    I have full signal and have wifi but I'm can't send messages or receive them. I can't make phone calls either. it picks and chooses when I can receive them and make calls. It only works everytime I turn my phone off.

    Try turning on Airplane mode for a little bit (20-30 seconds) and turn it back off. see if that doesn't allow you to re-connect.
    In my current project my office receives no signal at all. I have to do this almost every time I leave the office in order to get a signal.

  • The little 'E' that was next to my signal bars has dissapeared and now i can't send texts, make calls or go on the internet.HELP!

    The little 'E' that was next to my signal bars has dissapeared and now i can't send texts, make calls or go on the internet. WHY? HELP!

    As suggested make sure "cellular data" is ON and you have valid cellular data plan.
    That "E" sign only shows the network (Edge) or 3G (if you are in the 3G network), but it has no relation to you not been able to make regular calls or sending regular texts with network signal (in the form of bars) being present.
    Double check if you have credit in your phone (in case of pre-paid) or if you have reached your limit (in case of post-paid)

  • Can't send mail while send/receive process is ongoing

    I'm Using Microsoft office 2013 std.
    Problem with my outlook 2013, Can't Send an email while the outlook is downloading the emails(send/recieve process is on going) and just stuck to my to my outbox.
    Appreciate for help regarding this issue.
    thanks..

    Hi,
    Was the email been delivered after the send/receive progress finished? Based on my testing, seems it's the default behavior of Outlook email to stay in Outbox when the send/recieve process is on going.
    If the email still stuck in Outbox after the send/receive progress is finished, you can treat this issue as the "email stuck in Outbox" issue and troubleshoot it according to the steps below:
    http://support.microsoft.com/kb/2663435
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • I have recently been given a new iPhone 4, I put my old SIM card into the phone. It says I have signal and it is topped up but I still can't send or recieve calls/texts. Any help would be useful please?

    I have recently been given an iPhone 4, and I put in my old t-mobile simcard. It says that I have signal but i can't send/recieve calls and texts. Is there anyway this can be fixed?

    is the "old" T mobile sim an iPhone micro sim or something else ,
    if so that is likely your issue

  • Can I send the zoomed portion of a signal from data view to the next step

    I get a zoom window on Data View when I select it.  Can I send the zoomed portion to the next step or use it in any way?  If I Create VI with this,  will the zoomed portion show up in the VI?   Will a graph of any kind show up in the VI?

    Hi,
    Thankyou for posting to the National Instruments Forums.
    The feature you are looking for is the Subset and Resample step which may not be the exact thing you are looking for. If indeed this does not fulfil your needs we would love to hear about what features you would like implemented at the Product Suggestion Center.
    Hope this helps!
    Abhinav T.
    Applications Engineering
    National Instruments India
    LabVIEW Introduction Course - Six Hours
    Getting Started with NI-DAQmx
    Measurement Fundamentals

  • Can not send SMS text message.

    Hi, I'm a BlackBerry user for 4 years now and this is the first time that I have a problem with SMS text messaging. My precious BB is a Q10.
    The problem is that I can receive SMS messages but I can not answer and I can not send messages. When I tap the 'send' icon or press Enter nothing happens. My message dissapears and i can not see in the upper window, below the message that I've previously receive and I wanted to aswer for.
    Also, I can compose SMS message, but when I press Enter or tap send, nothing happens. No message in the hub, or in the text messages folder.
    I've rebooted the device, reloaded the OS, but didn't help.

    Hi and Welcome to the Community!
    With a strong carrier network signal (e.g., not merely WiFi), I suggest the following steps, in order, even if they seem redundant to what you have already tried (step 1 should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRT
    KB00510 How to register a BlackBerry smartphone with the wireless network
    Please wait for one "registration" message to arrive
    2) Reboot
    Pre-BB10 Devices ONLY. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes.
    BB10 Devices. Hold the top button down until the counter reaches zero. Wait for the device to be fully shut down (e.g., nothing at all displayed on the screen, no LED lights, etc.). Hold the top button until the red LED is lit. Wait through the full boot-up process. IF this fails, you can attempt the battery-pull method above, but it is normally NOT recommended unless nothing else works.
    See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you should contact your mobile service provider for formal support.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Sending POSIX signal to an external subprocess from a java program

    I'm programing in forte for java under linux-mandrake, I've execute an external subprocess with the runtime and Process clases, I need to send the 2� POSIX signal to this external subprocess, I mean de SIGINT signal, I know that you can send a signal from a shell just doing:
    Kill -2 pid // the SIGINT signal is the 2 POSIX signal
    I know that there is another system-call like : kill(int signal, int pid) that any one can send from a c program.
    Althought I don't know how can I get the pid of a suprocess, because I Know that there is the systemcall in c like:
    int getpid() wich gives the pid of the current process, but I need to have the pid of a subprocess not the current one.
    The thing is that I do not know how can I do it from a java program, I mean that to send a signal to a subprocess it will work using system-calls, but I do not know if I can insert system call in a java program, I've been thinking about doing it using a linux script like:
    #!bin/bash
    $a = pidof /home/maude-linux/bin/maude.linux
    # this is the path of the process wich is running
    kill -2 a$
    and the run this script from a java program doing an exec(sh script.bin)
    but by the moment I must be doing something wrong in the script because I find mistake in it, it gives me mistake in the assign sentence , I mean:
    $a = pidof /home/maude-linux/bin/maude.linux
    # this is the path of the process wich is running
    I'm not used to program shell scripts, perhaps I'm doing something wrong, is there something wrong in this sentence?.
    I would aprecciate some help about this, or if somebody have some idea how to do it in java, I repeat I need to send a signal to a external subprocess wich is launched from a java program by the process and runtime clases, and I need to send a SIGINT signal to the subprocess, I hope that some body can give some suggestion or some code explaining the situation

    Are the portions of bash-code verbatim in your post?
    When yes, they look suspicious!
    Instead of
    #!bin/bash
    #!/bin/bash
    would be better.
    $a = pidof /home/maude-linux/bin/maude.linux
    does not look good either.
    If you have command "pidof" telling the pid based on the path name of the executable passed to it as its argument, you can have the output of this program in a shell script like this:
    a=$( pidof /home/maude-linux/bin/maude.linux )
    Then through $a you will refer to the value of the variable "a":
    kill -SIGINT $a
    A pidof script could look like this (apart from error handling):
    ps -ef|awk '{if (NF>=8 && $8=="'"$1"'") print $2;}'
    This works for me; your mileage may vary.

Maybe you are looking for

  • Left Arrow Interactive Buttons in InDesign CS5.5 Backwards type

    Does anyone have a solution to the backwards type that appears in all left or previous page arrows in the InDesign Interactive Button Section? Is this a glitch in the software. It seems the left buttons were created by flopping the right arrows...thu

  • Mouse driver messed up my system: slow bootups

    I installed lcc213 (driver for my Logitech mouse) but it causes my Macbook Pro to boot up at half the speed. Then at the desktop it runs a background process called 'update_pre' which goes on for 3 minutes and I can't really do anything until it fini

  • Folios not updating

    Our multi-folio content needs some updates. I have followed these steps: 1. Updated the source files in INDD with the content updates. 2. Updated the articles in the Folio Builder panel 3. Updated the folios in Folio Producer There have not been any

  • How would you check URLs in a page before displaying?

    Any ideas how this could be done in Portal? Any thoughts appreciated.. Colin

  • 0RT_PA_TRAN_CONTROL  No data from PIPE to POS Analytics

    Hi Guys I hope you are fine! I am new to POSDM and I need to extract data from the PIPE. I am Using the configuration guide from SAP and I have made the pipe configuration as per the guide said. I understand I need to execute the PIPE dispatcher and