05-29-2003
I assume that your include statements are better than what you posted. I tried your code and it worked for me. I had to touch the file first since you didn't put O_CREAT in the open. But the program put a directory listing in the file. I don't know why you're having trouble.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I am trying to write a script that sends files via ftp from one server to another, i am using AIX 5.1. and bash shell to write my code.
I get an error when trying to run the following lines of code
ftp -n aptsbou01 <<!
user $username $password
binary
... (4 Replies)
Discussion started by: kswaraj
4 Replies
2. Windows & DOS: Issues & Discussions
Hello everyone. I just recently installed Cygwin and I am running it under Windows 7.
My problem is that I cannot seem to compile any C++ code with g++. I've tried to compile C Code using gcc and that works just fine. But Whenever I try to compile some C++ code, g++ throws a whole bunch of... (6 Replies)
Discussion started by: Anlex
6 Replies
3. Programming
Hey just wondering if someone can tell me the right line of code to use.
Basically my product codes for an ecommerce site all begin with three letters and an '/' sign
e.g ABC/1234 would map to the brand ABC in my excell file(product upload mapping)
This was done as the csv generating from... (0 Replies)
Discussion started by: romeo5577
0 Replies
4. Shell Programming and Scripting
Hi I am working with a 3.0 GB file and running the following script to process it. After running for 15 minutes, the script stops saying Out of memory or Killed.
Can the experts suggest where my code can be improved to save memory?
Thanks in advance.
#! usr/bin/perl
use warnings;
open... (3 Replies)
Discussion started by: polsum
3 Replies
5. Shell Programming and Scripting
Now theres another problem. I would like to output not just a colored block, but how would I output not a solid block character, but a shaded block instead?
Please help. I'm writing a library for these codes and this would really help. (4 Replies)
Discussion started by: tinman47
4 Replies
6. Shell Programming and Scripting
I'm relatively new to both UNIX and Linux and slightly less new at programming. But I can't figure out why this won't run properly.
It's meant to calculate the GCD of two numbers (simple enough, you'd think). And I designed it myself and it looks good to me and my instructor won't respond. If... (1 Reply)
Discussion started by: Sevchenko
1 Replies
7. Shell Programming and Scripting
Guys i have one file and i want the o/p from that file like below
This is my sample file and i want three things from it.
Name:
State just below the Name: dont want the state under the Retention Level:
And retention Level
Name: MEANS_SLP_DAILY
State:... (1 Reply)
Discussion started by: nirjhar17
1 Replies
8. Shell Programming and Scripting
Guys i have one file and i want the o/p from that file like below
This is my sample file and i want below things from it.
Name:
Sate just below the name:
And retention Level
Name: MEANS_SLP_DAILY
State: inactive
Retention Level: 3... (6 Replies)
Discussion started by: nirjhar17
6 Replies
LEARN ABOUT SUNOS
qprocsoff
qprocson(9F) Kernel Functions for Drivers qprocson(9F)
NAME
qprocson, qprocsoff - enable, disable put and service routines
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
void qprocson(queue_t *q);
void qprocsoff(queue_t *q);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
q Pointer to the RD side of a STREAMS queue pair.
DESCRIPTION
qprocson() enables the put and service routines of the driver or module whose read queue is pointed to by q. Threads cannot enter the mod-
ule instance through the put and service routines while they are disabled.
qprocson() must be called by the open routine of a driver or module before returning, and after any initialization necessary for the proper
functioning of the put and service routines.
qprocson() must be called before calling put(9F), putnext(9F), qbufcall(9F), qtimeout(9F), qwait(9F), or qwait_sig(9F).
qprocsoff() must be called by the close routine of a driver or module before returning, and before deallocating any resources necessary for
the proper functioning of the put and service routines. It also removes the queue's service routines from the service queue, and blocks
until any pending service processing completes.
The module or driver instance is guaranteed to be single-threaded before qprocson() is called and after qprocsoff() is called, except for
threads executing asynchronous events such as interrupt handlers and callbacks, which must be handled separately.
CONTEXT
These routines can be called from user or interrupt context.
SEE ALSO
close(9E), open(9E), put(9E), srv(9E), put(9F), putnext(9F), qbufcall(9F), qtimeout(9F), qwait(9F), qwait_sig(9F)
Writing Device Drivers
STREAMS Programming Guide
NOTES
The caller may not have the STREAM frozen during either of these calls.
SunOS 5.10 11 Nov 1992 qprocson(9F)