From owner-freebsd-questions Thu Oct 10 9:42: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E9ED37B401 for ; Thu, 10 Oct 2002 09:42:08 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id C464543E91 for ; Thu, 10 Oct 2002 09:38:29 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g9AGcRVc046405 for ; Thu, 10 Oct 2002 17:38:27 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g9AGb1Sh042644; Thu, 10 Oct 2002 17:37:01 +0100 (BST) Date: Thu, 10 Oct 2002 17:37:01 +0100 From: Matthew Seaman To: David Banning Cc: questions@FreeBSD.ORG Subject: Re: disappearing job Message-ID: <20021010163701.GA48409@happy-idiot-talk.infracaninophi> References: <20021010121114.A6678@skytrackercanada.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021010121114.A6678@skytrackercanada.com> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-14.1 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 10, 2002 at 12:11:14PM -0400, David Banning wrote: > I was editing a job in vi, then my hand slipped and I was back at > the shell. When I went to edit the file again, it said the file was > locked. A "ps ax | grep vi" showed that the application was still > running. Where did it go? There are two possibilities: i) You managed to type Ctrl-Z or equivalent and put your vi session to sleep. If you type: jobs you should see it listed. You can resurrect it using 'fg'. ii) You somehow managed to type something like the following to vi: :!/bin/sh which starts up that shell as a sub-process of vi --- a slight abuse of that vi-ism, designed for passing chunks of text from your vi buffer to an external process. In this case, if you type 'ps -lx' you should be able to trace back through the chain of parent PIDs from your shell back to vi. To get back to your editor session just exit from the shell and hit return when prompted to "Press any key to continue". Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message