ts-7000
[Top] [All Lists]

[ts-7000] dnotify or inotify in TS-Linux?

To:
Subject: [ts-7000] dnotify or inotify in TS-Linux?
From: "bburtan65" <>
Date: Mon, 14 Sep 2009 18:22:48 -0000
Does dnotify or inotify work in TS-Linux?

I can't seem to get this code to work.
http://souptonuts.sourceforge.net/code/dnotify.c.html

Ultimately, I need a way to tell in a user space app if a USB serial device is 
plugged in while the app is running.  I tried the above code modified to look 
into /dev/usb/tts and that didn't work so I tried the above code unmodified 
running as a background process and cp'ing a file.  Again, no soap.

And I even tried this:

int main()
{
        int fd, c;
        struct pollfd pfd;
        
        fd=open("/dev/usb/tts", O_RDONLY);
        if(fd==-1)
                return -1;
        pfd.fd=fd;
        pfd.events=POLLIN;
        while(1) {
                c=poll(&pfd, 1, 20000);
                if(c==-1)
                        printf("Error polling\n");
                else if(c==0)
                        printf("Timeout\n");
                else
                        printf("Something changed");
        }
}

But it's always printing "Something changed".





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] dnotify or inotify in TS-Linux?, bburtan65 <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU