delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/10/10:39:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Robert Praetorius" <RPraetorius AT AspenRes DOT Com>
Organization: Ministry of Hobo Regalia, Gauntlet Division
To: cygwin AT cygwin DOT com
Date: Fri, 11 Jan 2002 02:38:49 +1100
MIME-Version: 1.0
Subject: Re: telnet cannot see mount drive
Reply-to: RPraetorius AT AspenRes DOT Com
Message-ID: <3C3E5039.12007.43B1C51@localhost>
In-reply-to: <20020110144812.K12057@cygbert.vinschen.de>
References: <6044-Thu10Jan2002130735+0000-starksb AT ebi DOT ac DOT uk>
X-mailer: Pegasus Mail for Windows (v4.01)

--Message-Boundary-10820
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

     I have a crude, tacky workaround for this that I've been using with the AT command 
since the NT 3.51 days.  It fits much better with cron than with telnet (although 
perhaps something could be hacked up for telnet, too).

     Anyway, I have a little .BAT file in my Startup folder* that (implicitly) starts 
CMD.EXE and runs a little loop that, once a minute,  looks for .BAT files in my 
f:\Batch directory.  Whenever it finds one, it moves it to \Batch\Started and start up 
another CMD.EXE.

     Because this CMD.EXE was started in the context of my Windows NT login session, it 
has access to the drives I see interactively.  I can write batch jobs using the same 
drive mappings and not have to think about it.  My batch jobs, instead of being 
submitted directly, just put a stub in f:\Batch that points to the real job.

     I suppose, on the same principle, one could start a sort of CMD server in this 
context which would receive input/send output on a pipe, mailslot, whatever.  Whether 
it would perform reasonably for use with telnet, seems iffy, but vaguely possible. . .

     I imagine someone who knew the guts of NT pretty well could come up with a 
snappier solution, but that wouldn't be me.:-)  Meanwhile, what I have works for what I 
need it for.

*in NT 3.51, this seemed to need to be started as a login script, but
 NT 4.0 is happy if it's run from the Startup folder, which is a little
 less messy to set up.

> On Thu, Jan 10, 2002 at 01:07:35PM +0000, David Starks-Browning wrote:
> > On Thursday 10 Jan 02, Corinna Vinschen writes:
> > > Did you see my previous mail related to using network drives
> > > in ssh sessions, David?  That's the crucial stuff.
> > 
> > Probably, but I may have to dig around my archives.  I'll let you know
> > if I can't find it.
> 
> My bad.  I meant "cron", not "ssh".  The problem is the same.
> The message is http://cygwin.com/ml/cygwin/2002-01/msg00607.html
> from today.



--Message-Boundary-10820
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'BatchLoop.bat'

start /low /i /min F:\Users\RPraetorius\BatchLoop.bat
exit

--Message-Boundary-10820
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'BatchLoop.bat'

path
:again
for %%b in (f:\Batch\*.bat) do call :BatchExecute %%b
sleep 60
goto again
:BatchExecute
del f:\Batch\Started\%~nx1
move %1 f:\Batch\Started\%~nx1
start /i cmd /c "f:\Batch\Started\%~nx1 > f:\Batch\Logs\%~n1.log 2>&1"
--Message-Boundary-10820
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  SubmitToBatchLoop.pl
     Date:  2 Sep 1998, 0:17
     Size:  484 bytes.
     Type:  Program-source

--Message-Boundary-10820
Content-type: Application/Octet-stream; name="SubmitToBatchLoop.pl"; type=Program-source
Content-disposition: attachment; filename="SubmitToBatchLoop.pl"
Content-transfer-encoding: BASE64

JE5hbWVQYXJtID0gJEFSR1ZbMF07DQoNCiROYW1lUGFybSA9fiBzL14oLjopPy4qXFwvLzsJ
CQkjIHN0cmlwIGRldmljZSBhbmQgZGlyZWN0b3J5DQokRXh0ID0gJDEgaWYgKCROYW1lUGFy
bSA9fiBzL1wuKC4qPykkLy8pOwkjIHJlbW92ZSAoJiByZW1lbWJlcikgZXh0ZW5zaW9uDQoN
CnVuc2hpZnQgKEBBUkdWLCAicGVybCIpIGlmICgkRXh0ID1+IC9wbC9pKTsJIyBwcmVwZW5k
IHBlcmwgaWYgcGVybCBzY3JpcHQNCgkJCQkJCSMgKHRha2VzIGNhcmUgb2YgcmVkaXIgcHJv
YmxlbSkNCm9wZW4gKEJBVENIU1RVQiwgIj5GOlxcdGVtcFxcJHtOYW1lUGFybX0uYmF0Iik7
DQpwcmludCBCQVRDSFNUVUIgam9pbigiICIsIEBBUkdWKSwiXG4iOw0KY2xvc2UgQkFUQ0hT
VFVCOw0Kc3lzdGVtICdjbWQnLCAnL2MnLCAnbW92ZScsICJGOlxcVEVNUFxcJHtOYW1lUGFy
bX0uYmF0IiwNCiAgICAJCQkgICAgIkY6XFxCYXRjaFxcJHtOYW1lUGFybX0uYmF0IjsNCg==


--Message-Boundary-10820
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--Message-Boundary-10820--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019