github.com/westcoastroms/westcoastroms-build@v0.0.0-20190928114312-2350e5a73030/build/make/core/process_wrapper.sh (about)

     1  #!/bin/sh
     2  
     3  # When using a process wrapper, this is the top-level
     4  # command that is executed instead of the server
     5  # command.  It starts a new xterm in which the user can
     6  # interact with the new process.
     7  #
     8  # Inside of the xterm is a gdb session, through which
     9  # the user can debug the new process.
    10  
    11  # Save away these variables, since we may loose them
    12  # when starting in the xterm.
    13  export PREV_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
    14  export PREV_PATH=$PATH
    15  
    16  gnome-terminal -t "Wrapper: $1" --disable-factory -x $2/process_wrapper_gdb.sh "$@"
    17