FIFO's and asynchronousity?


 
Thread Tools Search this Thread
Top Forums Programming FIFO's and asynchronousity?
# 1  
Old 01-31-2009
FIFO's and asynchronousity?

Hello,

I have a FIFO which i would like to open O_WDWR | O_NONBLOCK | O_ASYNC and have a SIGIO signal generated when there is input on the FIFO, but there a re a bunch of bugs surrounding this (like for instance i read somewhere that you have to set O_ASYNC with fcntl etc.

is this even possible? has anyone done it and even better - does anyone have a code snippet?

-> maybe i'm going about it wrong, i need to create a bunch of software serial ports (without using kern modules) - would it be best to do it via FIFO's sockets or ptys?

i figured the unix forums would be the best place to come to ask this Smilie

thanks (on advance) for the help!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Mplayer fifo.

Hi all, First of all, sorry for the pastebin link. The code tags aren't working for me. #!/bin/bash # while-menu-dialog: a menu driven - Pastebin.com This is a channel "changer" shell script i'm working on. It uses dialog to display the menus. It... (3 Replies)
Discussion started by: ignatius
3 Replies

2. UNIX and Linux Applications

FIFO

Hello , I am working on unix FIFO IPC. i have a doubt regarding that. If the fifo is updated(write()) through one process....can we able to send any signal that fifo is updated and ready to get read...to other process.?? (0 Replies)
Discussion started by: Harry443
0 Replies

3. Programming

Help With FIFO problem...

=server.c= #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <string.h> #include <signal.h> #define MSGSIZE 50 (1 Reply)
Discussion started by: sponge
1 Replies

4. Programming

fifo

Dear friends i'm want to implement a program which one file is split into fragments by the server (by some random size) and sent to some processes, so these processes get randomly the fragments of the original file from the server, then the downloader randomly connects to some of these processes... (0 Replies)
Discussion started by: saman_glorious
0 Replies

5. Programming

How to see a FIFO from all the threads?

Hello C programming fellows!!! I'm doing a program with multiple threads in gnu/linux, ubuntu for beeing precise... This program consist in multiple threads, as logical each thread do different things and communicate to each other using IPC. The problem is that in "process 1" I have a... (1 Reply)
Discussion started by: Sandia_man
1 Replies

6. Programming

help About fifo and thread

hi, my problem is i have 10 thread for produces double two dimensional array these will produces 2d array 400 times ,then i have a thread to takes a two dimensional array then it inverse , and most 10 array can be in the fifo , and threads given takes one by one, now my problem is , i cant... (0 Replies)
Discussion started by: bblackened
0 Replies

7. UNIX for Dummies Questions & Answers

Doubts on FIFO

Hi , I m beginner for Unix and i want to use FIFO in my 2 Scripts . I want 1 script to read data from FIFO and other will write into FIFO. Despite reading so many articles/posts i am still unable sunchronize my scripts. My doubts are 1> Do We require both scripts as daemons to use... (0 Replies)
Discussion started by: Akshay
0 Replies

8. Programming

how to use fifo

hi, I have a problem. I've done a lil program which gets from the server the given persons username a personal folder. I made it with a pipe calling popen with a command, but how can i make the same thing using fifo. I make the fifo with mkfifo() func. and than what. How do I tell the sertver using... (3 Replies)
Discussion started by: atticus
3 Replies

9. UNIX for Advanced & Expert Users

FIFO Pipes

Hi...Can anyone please guide me on FIFO Pipes in UNIX.I have lerant things like creating fifo pipes,using them for reads and writes etc.I want to know what is the maximum amount of memory that such a pipe may have? Also can anyone guide me on where to get info on this topic from? (4 Replies)
Discussion started by: tej.buch
4 Replies

10. UNIX for Advanced & Expert Users

FIFO over NFS

Hi All L2000-44 HP-UX 11.00 I am attempting to setup a FIFO over NFS. Directing and reading from the FIFO works fine on the local machine - however when I direct to the FIFO from a server which has the directory NFS mounted it does not work. The a process to read from the FIFO on the local... (2 Replies)
Discussion started by: saabir
2 Replies
Login or Register to Ask a Question
ASKPASS-FIFO(8mandos)						   Mandos Manual					     ASKPASS-FIFO(8mandos)

NAME
askpass-fifo - Mandos plugin to get a password from a FIFO. SYNOPSIS
askpass-fifo DESCRIPTION
This program reads a password from a FIFO and outputs it to standard output. This program is not very useful on its own. This program is really meant to run as a plugin in the Mandos client-side system, where it is used as a fallback and alternative to retrieving passwords from a Mandos server. This program is meant to be imitate a feature of the askpass program, so that programs written to interface with it can keep working under the Mandos system. OPTIONS
This program takes no options. EXIT STATUS
If exit status is 0, the output from the program is the password as it was read. Otherwise, if exit status is other than 0, the program was interrupted or encountered an error, and any output so far could be corrupt and/or truncated, and should therefore be ignored. FILES
/lib/cryptsetup/passfifo This is the FIFO where this program will read the password. If it does not exist, it will be created. EXAMPLE
Note that normally, this program will not be invoked directly, but instead started by the Mandos plugin-runner(8mandos). This program takes no options. askpass-fifo SECURITY
The only thing that could be considered worthy of note is this: This program is meant to be run by plugin-runner(8mandos), and will, when run standalone, outside, in a normal environment, immediately output on its standard output any presumably secret password it just received. Therefore, when running this program standalone (which should never normally be done), take care not to type in any real secret password by force of habit, since it would then immediately be shown as output. SEE ALSO
intro(8mandos), fifo(7), plugin-runner(8mandos) COPYRIGHT
Copyright (C) 2008-2009, 2011-2012 Teddy Hogeborn, Bjorn Pahlsson This manual page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Mandos 1.5.5 2012-01-01 ASKPASS-FIFO(8mandos)