Search Results

Search: Posts Made By: frequency8
1,938
Posted By frequency8
What one line unix talk combo generates the following....
What one line unix talk combo would generate 95% cpu load? Im talking like something below
3,097
Posted By frequency8
How do I make multiple connections to the server in this case
Given the following code

#!/usr/bin/perl -w
use IO::Socket;

my($handle, $line, $kidpid);
$handle = IO::Socket::INET->new(
PeerAddr =>"64.22.229.139",
...
Forum: Programming 07-07-2007
5,157
Posted By frequency8
I could have sworn to god that I read someone...
I could have sworn to god that I read someone that fork and exec created new fd's in the book "Advanced Programming in the Unix Environment" by Stevens and Rago.
Forum: Programming 07-07-2007
5,157
Posted By frequency8
1) The OS I'm running on is Fedora Core 6....
1) The OS I'm running on is Fedora Core 6. However, the target systems are FreeBSD 5.x and OpenBSD 3.x. I even had some guy network engineer from ebay email me saying that he was able to get a clean...
Forum: Programming 07-07-2007
5,157
Posted By frequency8
On the code snippet I posted, fork and exec get...
On the code snippet I posted, fork and exec get called like 50 times in a row. The guy that is helping me develop this program says that every once in a while he gets the error message

"Out of...
Forum: Programming 07-07-2007
5,157
Posted By frequency8
Is this a legal close-on-exec-move?
In another part of the program, a file is opened using fopen(). Anyhow, I was wondering if using dup2() in the following snippet was a legal close-on-exec move.


static int
tel(char *user,...
Forum: Programming 07-01-2007
1,813
Posted By frequency8
Wait, never mind. It shows up in the debugger.
Wait, never mind. It shows up in the debugger.
Forum: Programming 07-01-2007
1,813
Posted By frequency8
How come nothing is added to utmp in this case?
Given the following:


#include <string.h>
#include <stdlib.h>
#include <pwd.h>
#include <unistd.h>
#include <utmp.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[])...
Forum: Programming 06-24-2007
1,769
Posted By frequency8
Okay, I decided to quit being up 48 hours and...
Okay, I decided to quit being up 48 hours and then start writing some crazy code. Instead, I've opted to sleep and only write semi-crazy code. How about using memcpy()? Maybe something like this

...
Forum: Programming 06-22-2007
1,769
Posted By frequency8
I need idas how to clean up this function.
OpenBSD complains when it sees this function in my program


/*This function takes the string "test\n" and returns the string "test\n\test\ntest\n"
ENTROPY = 1024
*/
void *build_string(int...
Forum: Programming 06-21-2007
2,818
Posted By frequency8
I wasn't too sure what I was doing either. I was...
I wasn't too sure what I was doing either. I was just trying to get it to work at the time. Anyhow, I thought about it and I think using strcpy() is the correct approach.
Forum: Programming 06-21-2007
2,818
Posted By frequency8
Sometime this week, I'll post a URL with the...
Sometime this week, I'll post a URL with the ENTIRE code.
Forum: Programming 06-21-2007
2,818
Posted By frequency8
Bear with this. My brain doesn't always...
Bear with this.

My brain doesn't always function correctly after I've worked 14 hours.


if((strarr=malloc(sizeof(line) + 1)) == NULL)


should have been

if((strarr=malloc(strlen(line)...
Forum: Programming 06-21-2007
2,818
Posted By frequency8
How come '\0' doesnt show up in the debugger?
I'm tracking down a stupid computer bug. I'm just sort of curious why
'/0' string won't show up after I add it. Here is the code snippet

void *allocate_string_array(size_t len, char *line, char...
Forum: Programming 06-16-2007
2,896
Posted By frequency8
Okay, no before anyone starts to think "Hey, I...
Okay, no before anyone starts to think "Hey, I might be doing this kids homework", I would like to point out that it's been over a decade since I've been in school. Anyhow, here is what I've...
Forum: Programming 06-16-2007
2,896
Posted By frequency8
If my input file was about I would need ...
If my input file was
about

I would need
ab
out

in my input file.

I just tried using fwrite() and it didn't work.
Forum: Programming 06-16-2007
2,896
Posted By frequency8
Regarding point 1. I would assume '\n' would be...
Regarding point 1. I would assume '\n' would be missing if it was the last line in the file. I still have no idea how to solve it in this case.

Regarding point 2. I compared the line with '\n'....
Forum: Programming 06-16-2007
2,896
Posted By frequency8
Need ideas how to attack this problem
I'm at a total loss how to attack this problem.

I have a file that contains
ab

What I need to do is if
1)if the string "ab" doesn't contain a newline, I need to insert one back into the...
Forum: Programming 06-05-2007
13,838
Posted By frequency8
A while back, I was was working on a program...
A while back, I was was working on a program that expand something like
a-z to abc...xyz. Anyhow, I have having similar issues with stuff being evaluated and discarding the results. I think this is...
Forum: Programming 06-05-2007
13,838
Posted By frequency8
I'm using the GNU C Compiler. I'm suspecting it...
I'm using the GNU C Compiler. I'm suspecting it might have to do with that fact that the '>> isn't a sequence point.
Forum: Programming 06-04-2007
13,838
Posted By frequency8
Question on order of headers and WEXITSTATUS
In one of the Unix Programming FAQ's they have the following headers in the program to catch SIGCHLD


#include <sys/types.h> /* include this before any other sys headers */
#include...
Forum: Programming 05-29-2007
4,902
Posted By frequency8
Yeah. Before I had discovered the miracles of...
Yeah. Before I had discovered the miracles of emacs RCS, I was just updating my programs without keeping track of previous versions. One of the versions I didn't keep track of was the previous...
Forum: Programming 05-29-2007
4,902
Posted By frequency8
An older version of this program I had used an...
An older version of this program I had used an array vs an input file. Ie, I would use something like


char *name[MAX]="la\nla\nla\n";


Then I would pass this array to my tel() function (ie...
Forum: Programming 05-29-2007
4,902
Posted By frequency8
neither one worked. Below is a crude, but...
neither one worked.

Below is a crude, but working example of what I mean. Please be gentle on the coding errors.


/*I wrote the original base code. I only know of one person that has taken...
Forum: Programming 05-28-2007
4,902
Posted By frequency8
When I run #include <unistd.h> #include...
When I run

#include <unistd.h>
#include <stdlib.h>

int main(int argc,char **argv)
{
execlp("tel","tel",argv[1],argv[2],NULL);
return 1;
}


I get the following
[cda@localhost ~]$...
Showing results 1 to 25 of 32

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