[Catalyst] Keep Plack -r working when commandline closed...?

Hartmaier Alexander alexander.hartmaier at t-systems.at
Thu Oct 29 08:43:30 GMT 2015


I'm wondering why you not just use an init script or systemd service unit to start/stop/restart your app?

Best regards, Alex

On 2015-10-27 15:55, Len Jaffe wrote:
If all  you want is to start a process and leave, then huponexit and/or nohup+background are fine.
If you want to start a process (event in the foreground) and leave it running while you detatch, and come back later to the same session, then tmux is the way to go.

You can learn enough tmux to be dangerous in ten minutes.  The only features of ti that i use are window splitting, session detach, and session attach.

On Tue, Oct 27, 2015 at 5:25 AM, Kieren Diment <diment at gmail.com<mailto:diment at gmail.com>> wrote:
I would say having HUPONEXIT false would be the more exotic feature set in this case.  tmux is actually a very good low rent low traffic short lifespan application deployment strategy ;).

On Tue, Oct 27, 2015 at 6:21 PM, Octavian Rasnita <<mailto:orasnita at gmail.com>orasnita at gmail.com<mailto:orasnita at gmail.com>> wrote:
Thanks. The conclusion is that if huponexit is set to false we can simply run processes in background appending & at the end of the command line.
So we don't need tmux nor screen unless we need other features offered by them.

--Octavian
----- Original Message -----
From: Lasse Makholm<mailto:lasse at unity3d.com>
To: The elegant MVC web framework<mailto:catalyst at lists.scsys.co.uk>
Sent: Monday, October 26, 2015 11:37 PM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?



On Mon, Oct 26, 2015 at 9:55 AM, Octavian Rasnita <<mailto:orasnita at gmail.com>orasnita at gmail.com<mailto:orasnita at gmail.com>> wrote:
When I connect to Linux servers using SSH and run the programs using
perl program.pl<http://program.pl> > something.log 2>&1 &
then I can use the command exit to close the SSH console but the program continues to run.
I remember that in past I needed to use nohup, but in last years I didn't need it anymore.

Is the SSH connection a special case but it doesn't work when using a real bash console directly?

Sounds like the huponexit is not set in your shell:
http://stackoverflow.com/questions/21294283/when-did-hup-stop-getting-sent-and-what-can-i-do-about-it

/L


--Octavian
----- Original Message -----
From: Len Jaffe<mailto:lenjaffe at jaffesystems.com>
To: <mailto:kieren at diment.org> kieren at diment.org<mailto:kieren at diment.org> ; The elegant MVC web framework<mailto:catalyst at lists.scsys.co.uk>
Sent: Monday, October 26, 2015 5:13 AM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?

& just backgrounds a job. If you close the terminal, you lose job control.
If you use tmux, you can close the terminal, but leave the session running, and reattach to the session later.

It is well work looking into.

On Sat, Oct 24, 2015 at 1:29 AM, Kieren Diment <<mailto:diment at gmail.com>diment at gmail.com<mailto:diment at gmail.com>> wrote:
Tmux is the poor man's deployment pathway ;).  I use it to keep long running jobs going between logins a lot too, as well as for having an editor in the right place from where I last left off.  All round a primo useful tool.  Also handy for persistent IRC connections etc.

On Sat, Oct 24, 2015 at 3:24 PM, Andrew <<mailto:catalystgroup at unitedgames.co.uk>catalystgroup at unitedgames.co.uk<mailto:catalystgroup at unitedgames.co.uk>> wrote:
A further search online,
throws up that screen and tmux can be useful if the app you want to run in the background needs input now and again.

----- Original Message -----
From: Andrew<mailto:catalystgroup at unitedgames.co.uk>
To: The elegant MVC web framework<mailto:catalyst at lists.scsys.co.uk>
Sent: Saturday, October 24, 2015 5:06 AM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?


Why is it better to use these over using an "&"....?

Or are you simply recommending them generally, due to their usefulness all round?

Yours,
Andrew.

----- Original Message -----
From: Kieren Diment<mailto:diment at gmail.com>
To: The elegant MVC web framework<mailto:catalyst at lists.scsys.co.uk>
Sent: Friday, October 23, 2015 10:48 PM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?

Tmux is generally newer and easier to use than screen, highly recommended.

On Sat, Oct 24, 2015 at 7:41 AM, Len Jaffe <<mailto:lenjaffe at jaffesystems.com>lenjaffe at jaffesystems.com<mailto:lenjaffe at jaffesystems.com>> wrote:
I'd still consider using screen or tmux...

On Fri, Oct 23, 2015 at 1:48 PM, Andrew <<mailto:catalystgroup at unitedgames.co.uk>catalystgroup at unitedgames.co.uk<mailto:catalystgroup at unitedgames.co.uk>> wrote:
Turns out it's super easy to run it in the background, =).

You just add "&" to the end of the commandline, =D.

^_^ Am learning these little server tricks, ;-).

[Tweeted Tatsuhiko Miyagawa of Plack fame, who was kind enough to promptly
respond, with this little gem, =D. Yay!]

Yours,
Andrew.


----- Original Message -----
From: "Trevor Leffler" <<mailto:tleffler at uw.edu>tleffler at uw.edu<mailto:tleffler at uw.edu>>
To: "The elegant MVC web framework" <<mailto:catalyst at lists.scsys.co.uk>catalyst at lists.scsys.co.uk<mailto:catalyst at lists.scsys.co.uk>>
Sent: Friday, October 23, 2015 4:28 PM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?


What about wrapping your shell session with screen?

$ man screen

--Trevor

On 10/23/2015 08:21 AM, Andrew wrote:
>
> I've ended up using Plackup to start the catalyst app's psgi script (still
> via fast cgi),
> and I'm using -r to indicate it should watch for changes, and reload the
> server when changes are detected.
>
> It does this fine, as long as my commandline terminal is still open.
> The moment I close it, the server continues to run, yet any watching for
> changes, killing, and restarting no longer happens (as far as I can tell).
>
> Is there any way to get Plack's scripts that watch and reload (i.e.
> Restarter.pm, etc), to continue to run after I close OSX's terminal window
/
> end the SSH session?
>
>
> Many thanks for any insights offered,
>
> Yours,
> Andrew.
>
>
> _______________________________________________
> List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
> Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
<http://www.mail-archive.com/catalyst@lists.scsys.co.uk/>http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/
>

_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/


_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/



--
Len Jaffe - Information Technology Smoke Jumper - <mailto:lenjaffe at jaffesystems.com> lenjaffe at jaffesystems.com<mailto:lenjaffe at jaffesystems.com>
614-404-4214<tel:614-404-4214>    @LenJaffe<https://www.twitter.com/lenJaffe>  <http://www.lenjaffe.com/> www.lenjaffe.com<http://www.lenjaffe.com>
Host of Code Jam Columbus<http://www.meetup.com/techlifecolumbus/>  - @CodeJamCMH<https://www.twitter.com/CodeJamCMH>
Curator of Advent Planet<http://www.lenjaffe.com/AdventPlanet/> - An Aggregation of Online Advent Calendars.


_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/


________________________________
_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/
________________________________
_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/

_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/



_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/




--
Len Jaffe - Information Technology Smoke Jumper - <mailto:lenjaffe at jaffesystems.com> lenjaffe at jaffesystems.com<mailto:lenjaffe at jaffesystems.com>
614-404-4214<tel:614-404-4214>    @LenJaffe<https://www.twitter.com/lenJaffe>  <http://www.lenjaffe.com/> www.lenjaffe.com<http://www.lenjaffe.com>
Host of Code Jam Columbus<http://www.meetup.com/techlifecolumbus/>  - @CodeJamCMH<https://www.twitter.com/CodeJamCMH>
Curator of Advent Planet<http://www.lenjaffe.com/AdventPlanet/> - An Aggregation of Online Advent Calendars.

________________________________
_______________________________________________
List: <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/

_______________________________________________
List: Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/



________________________________
_______________________________________________
List: Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

_______________________________________________
List: Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/



_______________________________________________
List: Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




--
Len Jaffe - Information Technology Smoke Jumper - lenjaffe at jaffesystems.com<mailto:lenjaffe at jaffesystems.com>
614-404-4214    @LenJaffe<https://www.twitter.com/lenJaffe>  <http://www.lenjaffe.com/> www.lenjaffe.com<http://www.lenjaffe.com>
Host of Code Jam Columbus<http://www.meetup.com/techlifecolumbus/>  - @CodeJamCMH<https://www.twitter.com/CodeJamCMH>
Curator of Advent Planet<http://www.lenjaffe.com/AdventPlanet/> - An Aggregation of Online Advent Calendars.




_______________________________________________
List: Catalyst at lists.scsys.co.uk<mailto:Catalyst at lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20151029/95894561/attachment.htm>


More information about the Catalyst mailing list