kRi Posted October 3, 2009 Report Share Posted October 3, 2009 Tātad mēģinu sameistarot skriptu, kas pārbauda vai iet viens noteikts process. Ja process neiet, tad skripts to palaiž. Problēma - tā kā process tiek palaists ar screen, tad ja viņš nobeidzās, proceslistē attiecīgais screen process paliek. Kā lai iemāca skriptam, lai neņem galvā to screen procesu? Link to comment Share on other sites More sharing options...
worm Posted October 3, 2009 Report Share Posted October 3, 2009 kā tu laid skrīnu? man šitā nekad nav gadījies, jo skrīns vienmēr nomirst kopā ar palaisto procesu... ja tu laid skrīnā kaut kādu bash skriptu kas tālāk palaiž procesu, tad tu bash skriptā vari uzzināt pidu lietojot variabli $$... nu ķipa PID=$$ un tad vari piemēram echo $PID > process.pid, pēctam vari čekot if [ ! -d /proc/`cat process.pid` ]; then /palaizham/pa/jauno/skriptu; fi Link to comment Share on other sites More sharing options...
kRi Posted October 4, 2009 Author Report Share Posted October 4, 2009 O, aizgājaa, paldies Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now