How to ignore a signal in linux?

hello,
i am writing a program in linux. and i dont want my program to be affected from any button combinations such as ctrl-c, ...
what functions should i use?
Regards

Within shell you can use trap command. For example, to inhibit the usage of Ctrl-C you can start your script with a line like this
trap ' ' 2
or, if you want to display some message when Ctrl-C in typed
trap 'echo <some message>' 2

Similar Messages

  • How to Ignore  the signal?

    Insert a number if the number of digits of that number is greater than its average return true else false.
    So what i'd like to know , (and btw sorry about the other questions) how can it ignore the signal ?
    e.g: number_aux = 53 -> this will be: Number of digits: 2
    Media = (5 +3) / 2 = 4
    ( 2 < 4 ) then return false. now i'd like to find a way to insert -53 (negative) and the output must be the same (false) ignoring de signal "-"
    here is my code:
    In this code if u inserted a negative ( -6 or -53) the output is always true because e takes in mind the signal . How do i tell him to ignore it?
        System.out.println.... 
          int number _aux =Integer.parseInt(... ....etc
                                              int sum = 0;
              int count = 0;
              int media;
              while (number_aux != 0){
              int digit = number_aux % 10;
              number_aux  /= 10;
              sum += digit;
              if(number_aux  >= 0) count++;
              media =(int) (sum / count);
              return (count > media);thank you so much.
    Josh

    I already used my brain LOLO , if new the answer i
    would not be here ask for help lol.
    shiver You forgot to add three or more exclamation marks.
    give me a hint , how to ignore the signal without
    that method ( using my code)If I'd give you any number, how would you do it? What would there conditions and formula be? Think about that. Programming isn't magic. It's finding a step-wise solution to a problem and writing it down.

  • How to trap (interrupt) signal from JVM

    How to capture (interrupt) signal from JVM in case of JVM termination due to Error/RuntimeException in shell script (Unix/Linux OS). Is it possible?
    I am executing an java class from shell script. In cetain condition it throws RuntinmeException.
    I want to capture the signal from terminating JVM in case of the RuntimeException.
    How to acheive this ? Can any one solve this problem ?

    Hi
    Using the POSIX signal java program , We can trap the JVM signals.
    Addition info
    Use sun.misc.SignalHandler - interface
    and MEthod sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );

  • How to ignore blank/null key figure value in BI Queries

    Reports on Multiprovider - we see some cells of a Key figure as blanks. These blanks are interpreted as zeros by the system and calculated accordingly resulting in incorrect values. As per our requirement, we need a count of all hard/real zeros only, not the blanks. For example, if there are 10 rows of which 6 are real zeros and 4 are blanks - our count should be 6 and not 10.
    How to ignore the blanks in BEx queries please?
    Thanks for your help.
    Upender

    Rakesh,
    It is not possible to find a pattern because the report is on a MultiProvider with 2 InfoProviders- Purchasing documents DSO and Material Movements InfoCube.
    Every Purchasing Document has several materials associated with it. These materials are compared with materials in Materials Movement. Not all materials in Purchasing Document are found in Materials Movement. For those Materials found in Materials Movement, the Quantity is obtained. For these found rows, the correct value is showing up - if the quantity is zero, it is showing in reports as zero. If the material is not found in Material Movements then Quantity shows up as blank values.
    My requirement is ignore such blank quantities and not count them. Only Quantities with 0 values should be counted. Currently both blanks and zero values are counted showing inflated count.
    Thanks,
    Upender

  • How do you use Airport extreme at hotels etc, when traveling? I can plug my computer into the Airport with my ethernet but how does Airport pickup signal?

    How do you use Airport extreme at hotels etc, when traveling? I can plug my computer into the Airport with my ethernet but how does Airport pickup signal? What equipment & devices do I need to travel with to make this possible?

    You may mean the AirPort Express.....not AirPort Extreme.....as the Express is a popular travel router.
    The whole idea behind using this device is that the hotel must provide an Ethernet jack in the hotel room. Then you connect the AirPort Express to the Ethernet jack with an Ethernet cable and configure it to provide your own wireless network in the room. You still have to agree to terms, pay the fees, etc.
    The problem with this approach is that it is getting very difficult to find hotels in North America that prrovide an Ethernet jack....most have moved to wireless networks and the others are not far behind.
    So, if the hotel is already providing a wireless signal, the AirPort Express is of no use in that situation.
    If you normally stay at the same hotels, and know that they provide Ethernet ports, an AirPort Express might make sense in terms of convenience.

  • How to ignore zero in select query

    select * from EINA where  EINAMATNR = <b>yyyy</b> and EINALIFNR = <b>zzzz</b>
    In select query, how to ignore zero? for example, EINAMATNR = 0000000yyyy, EINALIFNR=000zzz
    Maybe I can use LIKE keyword in sql query. Any other way?
    Thanks.

    Use the following conversion routines to convert yyyy & zzzz  to remove the leading zeros and then pass it to your select query.
    For Matnr -> CONVERSION_EXIT_MATN1_INPUT
    For LIFNR ->CONVERSION_EXIT_alpha_input.
       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = yyyy
            IMPORTING
              output = t_lifnr.
          CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
            EXPORTING
              input  = zzzz
            IMPORTING
              output = t_matnr.
    select * from EINA where EINA~MATNR = t_matnr  and EINA~LIFNR = t_lifnr .

  • How to ignore programmatically some items during a query ?

    Hi all,
    The process of my application is like this : first of all the end-user enters some criteria , then he/she presses a button to search for the possible results matching the criteria entered (execute_query). The possible results are displayed through a multirecord based datablock.
    The criteria screen has two parts , say part_a and part_b. When the end-user does not enter any criteria in part_b then the datasource of the results block should be a table , say data_source_1 ; and if some criteria are entered in part_b then the datasource of the results block should be a view , say data_source_2.
    The datasource data_source_1 has less number of columns than the datasource data_source_2 , but all of data_source_1's columns are included into data_source_2.
    So my problem is when the datasource of the results block is set to data_source_1 then there are unknown columns when executing the query (alert error). All of the columns of data_source_2 are included in the results block , and all of the columns of data_source_1 are automatically there because mathematically speaking data_source_1 is included into data_source_2.
    I have tried to use in the pre-query trigger of the results block this statement : set_item_property('results_possibles.column_a',queryable,property_false); but the same error still occurs.
    So how to ignore these items ?
    Thank you very much indeed.

    After looking at what you did to try to solve the problem, I'm not sure what the actual problem is.
    You can make both datasources have the same number of columns by selecting nulls:
    data_source_1: select a, b, c, null as d, null as e from <table>
    data_source_2: select a, b, c, d, e from <view>
    If you have a field which is used to query a column which is included in data_source_2 but not in data_source_1, and that field is populated when you run the query, then just set the block's default_where to ignore that field.
    eg
    data_source_1: where...and c like nvl(:control.c,'%')
    data_source_2: where...and c like nvl(:control.c,'%') and d like nvl(:control.d,'%')...

  • How to ignore the material with error in costing run ck40n

    Hi
    Pls, advice how to ignore parent material form costing run if the components of that material have errors. I need to run the costing run excluding erroneous parent item. Is any configuration on this..
    Pls help..
    K

    Hi Kesharika Goona... 
    If you want to exclude any material from Costing Run, there are two ways...
    1. Go to Material Master, Costing1 view, take the check box "Do Not Cost". If you opt for this check box, the system will not consider this material for costing.
    2. Where you run the standard cost estimate in CK40N, once you save you costing run with the parameters like Costing Variant etc, When you select the "Parameters" agains the Flow step of "Selection", you will be asked to give the inputs like Material Number, Plant etc.
    There, against the Material Number, on the extrem right side, you will see a arrow, press that arrow, and there you can see a tab "Exclude Single Values". There you have to give the material number which you want to exclude from the costing run press "Execute" icon on the botoom-left corner of that pop-up window..
    If you still face problem, pls revert back
    Srikanth Munnaluri

  • How to Ignore Header Line in FCC " Sender Side" .

    Hi SDNrs,
    I am getting a File Data  after FCC with header Data.
    How to Ignore that Header Line coming with actual data...
    Like Employeeid , Name , Deptid
    So this Employeeid , Name , Deptid is also coming as Data.
    Or what approach Should be Used?
    Regards
    Prabhat Sharma.

    Hi,
    Use " Document Offset" parameter in Sender File CC.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Thnaks
    Amit

  • How to extract the signal out from the waveform by my designated power level?

    Dear all,
         How can  I extract the signal from the waveform accroding to the power level? I read the Trigger&Gate.vi, but this vi extract signal according to the duration time. I want to extract signal according to power level.
         As shown in the following figures, the signal I want to process is between 130000 to 140000, if I zoom in, I can see the the useful signal is between 135400 to 138200. The question is how to extract the signal in the zone?  
        I tried the sub_NoiseEst_And_Chop_Shell.vi in the Packet_based_link example too, but this subvi seemed to be a little slow. Can anybody give me better advice? Thanks in advance!
    Solved!
    Go to Solution.

    I was working on something similar but haven't had time to fully develop it.
    My idea was to use an envelope detector (low pass filter) and then use an energy detection VI on the envelope.
    Here's where I left off
    Anthony F.
    Product Marketing Engineer
    National Instruments
    Attachments:
    test.vi ‏331 KB

  • How to ignore a DML operation using error handler.

    In our streams replication application (using Oracle 10G), we have error handler to handle the errors at destination apply process. It uses straight apply process no DML handlers except error handlers. The error handler should just log the error and LCR info into the error log table and discard the DML LCR. Error logging is not a problem. But the problem is how to ignore the error DML LCR and move to next LCR in the same transaction without rollback of the transaction or any error.
    Another question, do I need to use LCR.EXECUTE() procedure to continue the transaction in case of errors?
    Appreciated your help.

    Thanks for reference, confirmation of use of execute function.
    I read those pages and other related pages in "Oracle® Streams Concepts and Administration" too.
    I am able to write an error handler to handle errors with regular apply process. It is logging "no data found" errors but failing in case of foreign key violations. Error handler takes any kind of error and logs a record into errorlog table and ignores the error. I think it is not calling error handler. I checked for handlers in dba_apply_dml_handlers table. There is a handler for Inert, update and delete. I am investigating it further now. If you have any leads, please post.
    Thanks for your time and help.
    Dharma

  • How to make PWM signals In Labview 7.1

    How to make PWM signals In Labview 7.1, Could someone give me .vi for examples. Thank you.

    There is a shipping example that shows PWM if you have installed
    NI-DAQmx.  You can open the example through Help >> Find
    Examples >> Hardware Input and Output >> DAQmx >>
    Control >> General PWM-Counter Output VI.
    Good luck!
    Micaela N
    National Instruments

  • HT2434 How do I get my custom linux software to display at 1280x1024 on my iMac under Parallels? and stay that way when I reboot?

    How do I get my custom linux software to display at 1280x1024 on my iMac under Parallels? and stay that way when I reboot?

    Interesting. Comes with? you didn't have either before? Paragon is commercial and is now v. 10.0, they were the only one keeping updated and was supporting 10.7.4. I would not enable more than one.
    For writing to HFS Paragon has theirs but probably give the nod to MacDrive there.
    I never do an upgrade to a new OS over the old system, I backup (clone) and format the drive with the new OS and do the install so whatever is there I know is clean and also to keep from carrying around leftovers from years and systems past.
    I would assme Paragon is limited. Try their site and knowledge base?
    MacDrive
    http://www.mediafour.com/updates/macdrive
    Paragon HFS
    http://www.paragon-software.com/home/hfs-windows/
    Paragon NTFS
    http://www.macupdate.com/app/mac/26288/ntfs-for-mac-os-x
    http://www.paragon-software.com/home/ntfs-mac/

  • WRT54G Question on how far does the signal reach?

    Question on how far does the signal reach?
    Like from the system box at home base, could you take the laptop what distance from it? Miles? Or jus a short distance? And what distance if anyone knows?
    Message Edited by White_Devil on 04-09-2008 08:21 PM
    [b]Loved Charlton Heston[/b]

    My 54G is at the far end of my house in my home office, 80+ feet away thru 4 walls I still get 25% signal, enough for a decent connection. Having an all wood construction house helps a bit. Once I was in my car out in the driveway (~90 ft) and it still worked OK.
    I've got the bigger hi-gain antennas, not sure that they improve the range that much. I didn't really notice much signal gain going from the short ones to the tall ones.

  • How to ignore updates in mac app store

    Hi, can you tell me how to ignore updates in the mac app store.

    This is the second old thread that you have dug up today with your brand new account and posted a snotty comment. At best the hosts will edit your other comment, but more likely they will delete it. You agreed not to criticize Apple, its products and business decisions earlier today when you opened your new account. You have already violated that commitment.

Maybe you are looking for

  • Need Help - JVM error in Forms 10g in Debug mode

    Hello, This issue has bothered me since I started coding in Forms. If I use an Associative Array with a VARCHAR2 index type, whenever I try to look at the contents of the array, a small JVM aborting messagebox appears with OK as the only option. Once

  • How to do a complicated case statement

    In my windows form program a user can create an invoice for customers. In order to load the products to create the invoice, I need to make an sql stored procedure that takes the products from the products table. The problem is that there is something

  • Can I use pop ups with numbers? It works on my iMac but I lose it when I send it to my iPad. Did I do something wrong?

    I really need to ustilize drop down options in numbers spreadsheets. Is there any way to do it or any apps I can download to do it?

  • Listing albums/artists in text or pdf?

    I have quite a nice sized collection of music stored on my Mac and various external hard drives and am often asked about certain albums or artists in the collection. Is there a way (I have looked here and not found an answer in previous posts- so ple

  • Check boxes -Update many Items

    I have a list of Construction Specs and want to have one form with check box that when = Yes or 1 = dontshow item The form has a check box with each item The action update form does not update the database I get an error: