Search Results

Search: Posts Made By: jonas.gabriel
Forum: Programming 05-14-2008
2,717
Posted By jonas.gabriel
Multithread app - Read-Only Data
Hello,

I'm coding an application using pthreads.At some point the threads will read some read-only variables.Is it safe NOT to use mutexes, in order to make the program lighter since mutex...
Forum: Programming 04-18-2008
8,367
Posted By jonas.gabriel
I found my errors... mutex array size didn't...
I found my errors...

mutex array size didn't match the initialization loop.
&
inside initialization loop mispelled i with 1.

Excuse me for this useless thread...:(
Forum: Programming 04-17-2008
8,367
Posted By jonas.gabriel
segmnetation fault by pthread_mutex_unlock on a successfully locked mutex
Hi Everyone

I have this quite simple "tread" function
void* row_calc(void *input)
{
struct thread_arg* th_arg;
th_arg=(struct thread_arg *) input;
int start,width,end,seg,k,l,tmp;
...
Forum: Programming 12-07-2007
8,305
Posted By jonas.gabriel
Cloning a socket connection, using other port numbers
Hello everybody,

I've coded a multi-client server based on internet sockets using the scheme
listen on port X-accept-fork, exactly like beej's guide

At some point I would like to establish a...
Forum: Programming 06-14-2007
7,635
Posted By jonas.gabriel
math.h: float ceilf(float x)
Good morning,

I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>

int main (void)
{
float ceilf(float x);

int dev=3, result=0;

float tmp = 3.444f;...
Forum: Programming 06-12-2007
2,630
Posted By jonas.gabriel
No, but it is a start. :)
No, but it is a start. :)
Forum: Programming 06-12-2007
2,630
Posted By jonas.gabriel
Splitting the console into 2 "parts"
Good morning,

I would like to make a little interface for an application which will split the console in 2 "parts":

1 top area to print messages & 1 command prompt.

The printed messages are...
27,426
Posted By jonas.gabriel
Yes it works. Thank you
Yes it works.

Thank you
27,426
Posted By jonas.gabriel
ps with --sort option
Good morning,

Using command
root@slackware:~# ps -e -O sz --sort sz

part of the output is:
PID SZ S TTY TIME COMMAND
...
57 358 S ? 00:00:00 /usr/sbin/syslogd
...
13,232
Posted By jonas.gabriel
Thank all of you
Thank all of you
13,232
Posted By jonas.gabriel
regexp to get first line of string
Hi everybody


for file in *
#Bash performs filename expansion
#+ on expressions that globbing recognizes.
do

output="`grep -n "$1" "$file"`"
echo "$file: `expr "$output" : '\(^.*$\)'`"...
Forum: Programming 12-13-2006
7,366
Posted By jonas.gabriel
Thank you for your help. I'm finaly droping...
Thank you for your help.

I'm finaly droping signals.I have a solution using sockets that works with no problems on different machines.
Forum: Programming 12-13-2006
7,366
Posted By jonas.gabriel
Well here is something unexpected :confused: : ...
Well here is something unexpected :confused: :

SIGRTMIN worked on the Linux 2.4.31 kernel of SlackWare 10.2
but
failed on the SUSE LINUX Enterprise Server 9 (x86_64) - Kernel 2.6.5-7.276-smp.
Forum: Programming 12-13-2006
7,366
Posted By jonas.gabriel
I putted printf & fflush statements for debugging...
I putted printf & fflush statements for debugging purposes.The problem still exists without these statements..

I have a Linux 2.4.31 kernel, I'm using SlackWare 10.2 over VMware Workstation 5.5.I...
Forum: Programming 12-13-2006
7,366
Posted By jonas.gabriel
So it isn't a fault of mine. I'm working already...
So it isn't a fault of mine. I'm working already on a solution based on sockets using select.Should I reject signals as solution to my problem ? Reability of delivery is important to me.What is your...
Forum: Programming 12-12-2006
7,366
Posted By jonas.gabriel
I just have this simple statements ...
I just have this simple statements
tmp=sigqueue(getppid(),SIGUSR1,vsig);
close(handler.connfd);
printf("SERVER CHILD for %d: Out.Sigqueue returned %d\n",handler.id>0?handler.id:-handler.id,tmp);...
Forum: Programming 12-12-2006
7,366
Posted By jonas.gabriel
Loosing signals even with sigqueue
Hi everyone,

I have a process that forks many times.At a random time point the children must send a SIGUSR1 to the parent.To do that I'm using a pair of sigaction & sigqueue.However many signals...
Showing results 1 to 17 of 17

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