HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File Creation Daemon in C
Operating System - HP-UX
1827458
Members
5420
Online
109965
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 07:17 AM
12-11-2002 07:17 AM
Hi,
Does anyone have an example of C code that I can run as a daemon that will monitor a specified directory for the creation of a file?
I'm trying to avoid making "system" calls with "test -f" commands.
Thanks,
Tom
Does anyone have an example of C code that I can run as a daemon that will monitor a specified directory for the creation of a file?
I'm trying to avoid making "system" calls with "test -f" commands.
Thanks,
Tom
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 08:09 AM
12-11-2002 08:09 AM
Solution
Hi,
Here is an example. Compile it with make, then launch it with a directory as argument. I have commented 2 blocks of lines :
- first one is if you don't want it as a daemon just delete the block, but you will have to use nohup or things like that
- second is to insert you own code when a file has come. I didn't invest too much time in logfile management because I imagine that you won't keep it ... :^)
Regards.
Here is an example. Compile it with make, then launch it with a directory as argument. I have commented 2 blocks of lines :
- first one is if you don't want it as a daemon just delete the block, but you will have to use nohup or things like that
- second is to insert you own code when a file has come. I didn't invest too much time in logfile management because I imagine that you won't keep it ... :^)
Regards.
It works for me (© Bill McNAMARA ...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 12:50 PM
12-11-2002 12:50 PM
Re: File Creation Daemon in C
Jean-Louis,
Thanks!
I'll give it a try tomorrow.
Tom
Thanks!
I'll give it a try tomorrow.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2002 07:23 AM
12-12-2002 07:23 AM
Re: File Creation Daemon in C
Jean-Louis,
It worked like a champ, thanks!
I had to make one change. I had to change to .
And I was able to compile it with:
cc -ofilemond filemond.c
Thanks again,
Tom
It worked like a champ, thanks!
I had to make one change. I had to change
And I was able to compile it with:
cc -ofilemond filemond.c
Thanks again,
Tom
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP