Search Results

Search: Posts Made By: rayne
5,438
Posted By rayne
test-and-set in bash
I'm not talking about the assembly instruction TAS, a better name could be check-and-set :) Anyway, is there a way to simplify the following

if [ -z $VAR ]; then VAR="something"; fi

I have ~20...
Forum: Programming 08-08-2007
13,901
Posted By rayne
fetching a web page in C
Hello,

I'm a total newbie to HTTP commands, so I'm not sure how to do this. What I'd like is to write a C program to fetch the contents of a html page of a given address.

Could someone help...
Forum: Programming 07-26-2007
3,645
Posted By rayne
no autogen.sh?
I tried to make a little test library so see whether if I can get autotools working for a library. I somewhat did, it compiles, but some targets, such as dist, fail.

The test library is here:
...
12,706
Posted By rayne
No, it doesn't work. aigles, I'm actually...
No, it doesn't work.
aigles, I'm actually looking for a way to do this in a for loop, if possible. Thanks anyway.
12,706
Posted By rayne
how to handle spaces in filenames
I'm trying to do something like that:
for $filename in `ls -1`
do
some_command $filename
done

but it doesn't work properly for file names with spaces, for...in splits at spaces. Anyway...
Forum: Programming 08-29-2006
19,015
Posted By rayne
OK, I figured it out. zlib function...
OK, I figured it out.

zlib function uncompress uses inflateInit(), which accepts zlib format, not gzip. I've changed inflateInit() to inflateInit2() and it worked.

However, for 2nd argument of...
Forum: Programming 08-28-2006
19,015
Posted By rayne
uncompress of zlib
When I gzopen & gzread from a gzip file, it works OK. But I when I try to uncompress the same data from memory (either by reading to memory with fread or mmap()ing) using decompress, I get...
2,712
Posted By rayne
No, I mean this: I have index.php, some variables...
No, I mean this: I have index.php, some variables in it, and a URL to another page, say index2.php. When user clicks index2.php, previous variables no longer exists, right?



I mean a PHP class...
2,712
Posted By rayne
lame php question
When do PHP variables/objects vanish?
Say, I have a database structure in index.php, I called connect(). Then I sent the user another page, say index2.php. Should I create a fresh database structure...
5,372
Posted By rayne
Geee. I've seen that ages ago. And it didn't help...
Geee. I've seen that ages ago. And it didn't help a bit.
I don't want any pipes for stdout, stdin, stderr, etc. I simply want to mimic exec(), I want something that should work exectly as exec(),...
5,372
Posted By rayne
proc_open
Hi,

My server has disabled exec() of PHP, but they still left proc_open() available for the task. The problem is, I don't know how to use proc_open()!

I just want to simulate exec() with...
37,758
Posted By rayne
PID in BASH
In a shell script, in need to execute a proccess in background, do some jobs then kill that process. ie,


someproc parameter1 &
somescript.sh
kill pid_of_the_proc_in_the_first_line


How can...
2,614
Posted By rayne
LISP newbie's questions
Hello,

I want to learn LISP, and I have a GNU/Linux OS. I first sought a LISP compiler/interpreter and was told that GNU Emacs has a LISP mode. But I couldn't get into LISP mode, nor I don't know...
6,420
Posted By rayne
Multiprocessing under Linux
I'm writing C programs to be executed on a multi-processor UNIX (GNU/Linux, kernel 2.6.11) Do I need to add a special kind of code to somewhere or run a special utility to execute the program file to...
5,291
Posted By rayne
timed commands
Hello,

How can I set up events to be executed at a certain time? And do I need some kind of privilege such as being in cron group?
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 11:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy