I'm writing a simple Client program in C using sockets to transfer a file from a server also written in C which is running ( and tested correctly). The problem is, I'm able to transfer text or...
Basically we have a read thread that does the following:
for ( bool done = false ; !done ; ) {
//
// Under normal conditions this loop should have a read action
...
Hi,
Is there any way that I can read the TSC (Time Stamp Counter) register (available in Intel processors since Pentium) at different times, calculate how many cpu cycles has passed and conve...
hi,
I have a multi-threads program that run in user level. some of the running (not all of them) end up with segmentation fault. the stack i see using gdb leads to the following:
...
malloc...
How can I do a net send to a windows machine on my Linux server?
Right now I using a shell script to send a wall message on my sevrer, but I want it to be sent to my local machine because I...
Hi,
I'm writing a ksh script that has to display the dates from a given date up to the present. I'm not sure how I'm going to "count" up from the given date. Also, I would prefer to not us...
Hello,
i made a shell script to automatically tar files from a given filelist (.txt), the script is below.
My problem is that there is an issue with the tar command, which seems not to und...
I am trying to make Nagios tell me is a text string on a page exists and show a fault if it doesn't. It never fails even if I put in a string that doesn't exist on the site. I am doing somet...
Hi I need assistance with a script to check if a process is running, if it is it will output a message indicating that such process is running, otherwise will execute the rest of the script.
...
Hey all, after a nearly 7 year layoff from Linux, I am back at it :)
I cannot remember the command to enable PHP with MySQL. I got my CentOS box up and running on my virtualized host but j...
hi, is there a way to link against a windows dll under linux? maybe with WINE?
thanks, i really appreciate your help
after the following code:
for(;;) {
accept (socket,....)
if fork() {
// do something
execlp(',,,,');
....
}
}
always appear the process statu...
Can somebody give me example of using associative arrays within expect script?
I need to create a map from string to string, then access/get value by key.
Could somebody provide me the code to read & write an XML file in QT4/C++ that's got the following format:
<?xml version="1.0"?>
<projectgui>
<filename>
<scenario>MyScenarioFolder</scenari...
Hello,
I'm looking for a solution, how I can have a pipe opened in a parent-process, that sends and a secound one that gets data from it's child. The child should receive and send it's stdi...
How to use "Semaphore" function under linux with gcc?
"Semaphore" function:sem_wait sem_open sem_unlink sem_post...
And How to bulit it,run it?
sample:
struct shared
{
sem...
I have a unique situation here.
I have several CSV files with thousands of lines that I need to parse based on the value in the column 3 of the record and copy the records to separate file...
Say, what telnet application on linux system (not running GUI) listening to a specific port can do following:
Quintum device sends CDR records via port: It requires a CHR Line feed to tell ...
Hello,
I am trying to unzip all files that start with "MF" and end with ".zip" in a folder and have them extracted to another folder. They are password protected. Here is what I am trying:
...
hi, I am not very confortable writing shell scripts in plain textpad or pspad or notepad... is there a Shell IDE or something that can help me with syntax, formatting, creating comments, etc?
...
I'm trying to customize my C/C++ indentation style. I'm trying to set this for both C and C++ modes. The style I'm looking for is this:
function(args)
{
statement;
if(test)
...
This is for a C++ program.
I have a program where I fork and exec to create a child process then waitpid to wait for it to end. Then I need to get the value the child process returned but ...
I'm trying to set up a script that I can submit as a cron job and run daily from my web hosting company. The script I want needs to delete all files from a specific folder that are older than...
I admit that I'm quite new to Linux, but I'm getting results from the "ls" command that I do not expect. It seems to want to do a recursive search when I don't specify the "-R" parameter. Is...