473,322 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Is there a way for c# to signal a Linux box?

D
I need to ftp a file over to linux and send some sort of message or signal
to process it. c++ to Linux via rpc was a thought but not sure how to do
that in c#.

Also something that's also going to 64 bit Linux would be preferable.

Thanks alot.

Apr 14 '06 #1
4 1130
You could build a simple daemon process running on your Linux box that
regularly polls the FTP folder for new files, then when it finds one it
can process it.

Or maybe you could have a simple CGI web page on your Linux box., You
could pass a parameter to the page when the file is ready to process
using a .NET WebClient object.

HTH,

Chris

Apr 14 '06 #2
D

"Chris Fulstow" <ch**********@hotmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
You could build a simple daemon process running on your Linux box that
regularly polls the FTP folder for new files, then when it finds one it
can process it.

That was my first thought but then was reading more about what if it wakes
up during the file transfer and the file is still open. The files are tiny
and the chances are slim but given that chance a system will eventually find
it. Actually now that I think about it I recall working on a system (years
ago) that was using perl and I think the same question came up and the perl
developer said that perl had a built in thing that would prevent that. I'll
have to see if I can dig that stuff up.
Or maybe you could have a simple CGI web page on your Linux box., You
could pass a parameter to the page when the file is ready to process
using a .NET WebClient object.

HTH,
I like that idea because I would like to also give the ability to do the
same from a web page that a standard user would use.
Chris


Thanks.
Apr 14 '06 #3

"D" <Da**@nothing.net> wrote in message
news:ee**************@TK2MSFTNGP03.phx.gbl...
I need to ftp a file over to linux and send some sort of message or signal
to process it. c++ to Linux via rpc was a thought but not sure how to do
that in c#.

Also something that's also going to 64 bit Linux would be preferable.

A message over a TCP socket would be pretty simple.
Apr 14 '06 #4
D wrote:
"Chris Fulstow" <ch**********@hotmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
You could build a simple daemon process running on your Linux box that
regularly polls the FTP folder for new files, then when it finds one it
can process it.


That was my first thought but then was reading more about what if it wakes
up during the file transfer and the file is still open. The files are tiny
and the chances are slim but given that chance a system will eventually find
it. Actually now that I think about it I recall working on a system (years
ago) that was using perl and I think the same question came up and the perl
developer said that perl had a built in thing that would prevent that. I'll
have to see if I can dig that stuff up.


Hi, all you would need to do on the Linux box would be to check to see
if you can get a exclusive file lock.
If you cannot get one you then the file is still being written to.

Otherwise a small TCP daemon would be easy as well.
Dan
Apr 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mkent | last post by:
I'm trying to use signal.alarm to stop a run-away os.system command. Can anyone exlain the following behavior? Given following the trivial program: import os import signal def...
1
by: Jorge | last post by:
All, I've got a process that creates some children and want to be alerted when they die. To do this, the SIGCHLD signal is registered in the process using sigaction to jump to a subprogram as...
0
by: rh0dium | last post by:
Hi all, I don't understand the signal module. I guess I understand what it does in principle but I can't figure out how to use it to timeout an external rsh command after a 5 seconds. Does...
3
by: LeTubs | last post by:
Hi I'm not sure if this is correct ...place to post but here goes This is what i'm trying to do, I want to write a signal / alarm handler ( I don't know which hence the posting here, as once I...
2
by: gnutuxy | last post by:
Hi, I am newbie in the Unix system programming and in learning phase. I usually read the libc manual and then try to implement small programs to test/check the learnt thing. I read the libc...
5
by: Sontu | last post by:
Hi all, Consider the following code: #include<signal.h> #include<stdio.h> #include<sys/mman.h> void handler(int sig) {
1
by: Charles Sullivan | last post by:
I have existing code in which the signal() and signal handler functions appear (for example) like this: ---------------------- #include <signal.h> void my_handler(int signo); signal(SIGALRM,...
0
by: Marco | last post by:
Can I use LinuX signal as a tool for commuction with a QT(PyQt4) programme? The follow code didNOT work... from PyQt4 import QtCore,QtGui import signal import sys import os
1
by: 32Alpha | last post by:
Hi, first post here. First off, this IS a homework assignment for an operating systems class, but the question isn't "how do i do the assignment" but "why is my particular implementation not...
9
by: thagor2008 | last post by:
Is the behaviour of throwing exceptions in a unix signal handler defined? eg: void sighandler(int sig) { ... do something throw myobj; }
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.