[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: React to File changes



Hi,

Hum...something's not clear somewhere...

on the Unix ( samba side )...

mknod some_file p

( a simple daemon, you'd probably much more )
cat < some_file | my_program_to_process_data

in a DOS shell on the Windows 98 box

copy c:\autoexec.bat ${samba_share}\some_file

and watch it end up at "my_program_to_process_data" on the unix box...

For testing purposes, just do the "cat < some_file" and the information
will appear on your screen as it the DOS program writes it to the file.

and no, I never did get W2K to work.  I didn't have alot of time to work
on it, and the box was several 1000's of km's away, so I just made our
client install a small Win98 box to do handle the communication ( they 
upgraded on the weekend without telling me, and things quit working on
Monday.. wonder why??)

Hope this helps
> 
> >Hi,
> >
> >You don't say what the overlying OS is that the DOS program is
> >running under, but if it's NOT W2K,
> 
> It is actually Win98 at this point.
> 
> >mknod some_file p
> 
> This sounds good and it seems to work . . . except:
> 
> $cat temp > some_file
> gives me the expected result
> 
> however, if I try . . .
> $ cat temp | some_file
> sh: some_file: cannot execute - Permission denied
> $ls -l some_file
> prwxr-xr-x  1 allenwc  1000  0 Feb 13 10:54 some_file
> $
> 
> >I had this running as a communication method between DOS & Unix until
> >W2K was installed @ A clients.  This completely broke it, as the
> >file would be deleted first, then overwritten ( no change to the actual
> >application, W2K was being very kind and doing more than it was asked! ).
> 
> Did you find a way to get W2K to NOT delete the file first?
> Currently the system does not delete the file it just removes the 
> contents first.
> 
> What would I do if I wanted to pretend that my program was a block 
> character device like a terminal or a printer?
> 
> mknod /dev/lpt3 b 16 3
> 
> ???
> In that case I'd be getting input from the stdin right?
> Have to think about how to wait for input in this case though.
> -- 
> Later . . . 'liam
> 
> allenwc@home.com
> William C Allen, BLS, EET
> 
> "It may be that your sole purpose in life is to serve as a warning to others"
> Unknown
> 


-- 
	Steve Williams, Calgary, Alberta, Canada
	Genie Computer Systems Inc.
	steve@genie96.com

"A man doesn't begin to attain wisdom until he recognizes that he is 
 no longer indispensable."
- Admiral Richard E. Byrd ( 1888-1957 )