Menu

Ignore exit code when using shell

Help
2008-02-19
2013-03-15
  • Henrik Goldman

    Henrik Goldman - 2008-02-19

    Lets say I want to make a task happen every time a makefile is executed.

    As a part of a testcase I want to ensure that no leftovers from a failed test can happen.

    I would implement something like:

    KILL_PROC := $(shell killall myprocess)

    This works fine except when there is no process. Then the app exits with error code 1. Normally I would use a minus in front of the actuall command... but with this syntax it's being intepretted as a different command.
    Is there any resolution on this?

    -- Henrik

     
    • Daniel Pfeiffer

      Daniel Pfeiffer - 2008-02-20

      Hi Henrik,

      the behaviour you noticed is incompatible with gmake, and hence should be dropped, transforming the error into a warning.  Any objections?

      Daniel

       
      • Henrik Goldman

        Henrik Goldman - 2008-02-23

        Well I don't mind if you want everything to remain compatible with gmake. However it would be useful if there was another way to get the same result.

        What would this warning say?

         
        • Daniel Pfeiffer

          Daniel Pfeiffer - 2008-02-24

          Same message as the old error.  Resynch and you've got it.

           

Log in to post a comment.