Subject: auto-backup question

From: "javier" <[email-masked]>
Date: Mon, 16 Apr 2001 15:19:12 -0400

Hi, when pine/pico determines your session has been interrupted (as from a
disconnection) it thoughtfully saves your work in the current directory as
'file.save'.

My question is, how exactly can I force this behavior to happen?  I was
connected to my server via ssh, editing code with pico when I became
disconnected.  Unfortunately pico hasn't realized this yet (it's been 2
hours since I lost the session).  What can I do to make pico realize I'm no
longer there?  Should I kill its parent shell?

The last thing I want to do is kill pico or its parent in a way that will
abort the auto-save feature, and thus lose about 300 lines of code.

Any timely help greatly appreciated.  This is a Linux 2.2.x system running
pico 3.7.

Thanks,
Javier

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: "Mike A. Harris" <[email-masked]>
Date: Mon, 16 Apr 2001 16:47:56 -0400 (EDT)

>longer there?  Should I kill its parent shell?

kill <pid of pico>

>abort the auto-save feature, and thus lose about 300 lines of code.

The above should do it ok.  Start pico in another login and test-
kill the new pico and see what happens.  You should be ok.

>Any timely help greatly appreciated.  This is a Linux 2.2.x system running

That version of pico contains tmpfile races which may be a
security risk on your system.  pico will follow a symlink when
saving the backup file and can overwrite any file to which the
owner of the file being edited has access to.  This is
particularly a concern when editing files in shared directories.

I recommend upgrading to PINE 4.33 right away.

-- 
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
Red Hat Inc.                    Ontario, Canada, P6C 5B3
http://www.redhat.com           Phone: (705)949-2136

---

From: Jared Griffith <[email-masked]>
Date: Mon, 16 Apr 2001 14:06:49 -0700 (PDT)

First of all, I can resist... (as he fears a religious war) check into vim
(like the 'vi' editor, but on steroids.)  It's much more conducive to
writing code.  :) :)

Ok, now your problem...  Try:

$ ps -ef | grep pico
   jared  9555  9554  0 13:59:10 ttys8     0:00 pico
   jared  9554  9669  1 13:59:10 ttypf     0:00 xterm -geometry 82x47+144+0 -e pico
$ kill -15 9555

The '-15' is the SIGTERM signal, which is trappable, allowing pico to exit
gracefully.  I would test this, first, on another pico session.  I tested
it on HP-UX and it worked fine.

jared