Just to clarify ..i dont THINK it would be too hard but what do i know :)
i need to add a custom config to putty , it reads this while starting and changes how it handles input/output from telnet...
Type: Posts; User: NetworkLearning
Just to clarify ..i dont THINK it would be too hard but what do i know :)
i need to add a custom config to putty , it reads this while starting and changes how it handles input/output from telnet...
i have an idea i would like to see materialize ..if some c guru has some time to take on a small project please let me know
if this is the wrong place to post , i apologize please let me know where...
Got the poll function working , but now it only lasts a little bit longer , still dies :(
Btw i just ran
file on the program
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
Ok i re-read your whole posts .. i will give you this i am over my head ..but can you help ? what FACTS would you like me to share ? i can share my screen with you on teamviewer if that helps ?
What i am basically doing is not wrapping poll , and calling poll from poll again , so it gets called a few hundred times before i kill the program
so i know its getting called
i hope i am able to...
#include <poll.h>
#include <unistd.h>
#include <stdio.h>
int poll(struct pollfd *fds, nfds_t nfds, int timeout) {
usleep(100);
printf("Sleeping\n");
return poll(fds,nfds,timeout);...
It compiles without error but my poll is not getting called
1. Preload works as i have tested it with removing wrap, then it gets into the function ( tested by adding a printf )
I need to wrap poll()
and this is what i am trying to use
#include <poll.h>
#include <unistd.h>
#include <sys/types.h>
int __wrap_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
hey
I dont get any errors
and when i preload it with ld_preload , it does load
i check it with LD_PRELOAD=/home/poll.so ldd ./program
but the program is not using my version of the poll
can someone tell me my mistake in this ?
#include <poll.h>
#include <stdio.h>
#include <unistd.h>
int __wrap_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
Update: I can sun 2 copies just fine
but another 2 dont work
Ok another interesting thing , hope i dont jinx it , 2 copies are running fine of the same program with same timer.so loaded and 2 keep crashing
btw the file its trying to open i think is a socket that it uses to communicate with the other copy of the program
basically you run 4 copies and they send stuff to each other by opening a socket in...
btw there is no corefile
Thanx but my doubt is
1. when i added printf to empty gettime
i DO get the *s printed on my screen
2. is it possible that it , like you say , loads the new gettime
and original gettime ,
but...
so salem can you help me with the code for what i have in mind ?
gettimeofday()
if called first time , return correct time , store in variable
after being called 2nd to 20 or 30 or...
when i give it return 0 for gettimeofday ( empty function just returns 0)
then it gets stuck at
t_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0
poll([{fd=4, events=POLLIN}, {fd=6,...
i increased it to 500
and still no luck
rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0
gettimeofday({1348140798, 56749}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0...
I have it running the new poll and its dumping core and strace is being written faster
nope dumped core
I am testing it now
but in the meantime if this does not work
this is what i was thinking
have a counter written to a file first time gettimeofday is called
let it get the right time 20 times(...
strace is writing about 15mb a second with this
is that normal :)
Dammit spoke too soon :(
Core dumped
well it ran for a whole 10 mins longer than before thats a good sign
[QUOTE=NetworkLearning;1123684]Salem,
are you still here
OK i have the program reading my version ( or your version ) of gettimeday but does not seem to be doing anything tho ?
maybe throttle...