Linux (Xlib) Application hangs on GetGeometry()


 
Thread Tools Search this Thread
Top Forums Programming Linux (Xlib) Application hangs on GetGeometry()
# 1  
Old 06-12-2018
Linux (Xlib) Application hangs on GetGeometry()

Hello,

I was just wondering why XGetGeometry() would cause a hang in an application.

In the xlib book it says any of there "Get" functions don't necessarily return immediately.

Is there a way to make a it return immediately or other functions that will give me the same results.


I tried using XFlush() and Xsync() before & after the XGetGeometry() function call. Also I tried using xlib's XGetWindowAttributes() instead of XGetGeometry().

Moderator's Comments:
Mod Comment edit by bakunin: moved to the fitting forum

Last edited by bakunin; 06-12-2018 at 06:28 PM..
# 2  
Old 07-12-2018
Because they're stateful: The server doesn't just acknowledge receiving it, it must perform the command and retrieve the answer before the command returns.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux Application Memory usage

Hello We are in the process of migrating few of our applications in our linux boxes to new linux box to streamline our applications . In this context , i would like to know how we can calculate a particular application is used .? This data will then be used to select which applications need... (7 Replies)
Discussion started by: ron5174
7 Replies

2. UNIX for Advanced & Expert Users

Xlib: XKeysymToKeycode hangs

Two simple questions related to the following puzzling behaviour: I have the following line of code: const KeyCode kc = XKeysymToKeycode(_display_p, ks); where _display_p is a valid Display* returned from XOpenDisplay() and ks has the value 103 (which was returned by XStringToKeysym(),... (2 Replies)
Discussion started by: N7DR
2 Replies

3. UNIX and Linux Applications

Timer application in linux

Hello everyone, It is good to be here. I am a newbie to Linux.Can anyone help me in designing a timer application. The timer has to start.And after certain time interval the program should call a function continuously.It should not be in sleep mode.During the course of that time interval the... (0 Replies)
Discussion started by: Harry443
0 Replies

4. Shell Programming and Scripting

Expect script hangs Linux

When I run script listed below it causes my Linux to hang. When it freezes I can do totally nothing, move cursor, switch to another terminal or whatever. Linux is just not responding and the only way out I know is a hard reset of PC. #!/bin/bash if ; then echo "one parameter is needed: IP... (3 Replies)
Discussion started by: mass85
3 Replies

5. Red Hat

Linux system hangs giving ntp errors

Hi folks, I am facing issue of my system (host1) getting hanged after throwing following ntpd messages. I am not able to ssh to the server there after. only option is to restart the host: Dec 29 02:58:51 host1 ntpd: time reset -0.207907 s Dec 29 02:58:51 host1 ntpd: synchronisation lost Dec 29... (0 Replies)
Discussion started by: SiddhV
0 Replies

6. Shell Programming and Scripting

Shell script runs fine in Solaris, in Linux hangs at wait command

HI, I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging. here is the core of the script CFG_FILE=tab25.cfg sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c do #echo "jobs output" #jobs #echo "jobs... (13 Replies)
Discussion started by: aksaravanan
13 Replies

7. Programming

Application Cleanup during Linux Shutdown

I'm trying to do some cleanup (write open files) when Linux shuts down. I thought the right method would be to trap SIGTERM and do the necessary processing. Here's my sample code: #include <stdio.h> // for File I/O #include <signal.h> // for signals #include <unistd.h> // for sleep() void... (6 Replies)
Discussion started by: whatisron
6 Replies

8. UNIX for Advanced & Expert Users

Linux Based Application OID

Hi I am searching for system OID on an application which is linux based. Can any one please let me know, where can I find from Command line? Thanks in advance. (1 Reply)
Discussion started by: sureshcisco
1 Replies

9. UNIX for Advanced & Expert Users

Linux machines hangs for a short while.

Hello! I'm managing a SuSE Linux 10 server which alot of users are using as login server and also as a build server.. There is a wierd problem with it cus' it hangs for about 30seconds ever so often and then resumes like before, this is when using SSH. It's not that heavley loaded but there... (2 Replies)
Discussion started by: Esaia
2 Replies

10. Programming

xlib blues (XFree86 - Linux)

My goal is to open a window in the X-server and plot a series of pixels. However, I find many examples I have tried to draw to a window fail and the window remains blank. Therefore, I am here requesting information. I do not know c, and am a beginner. Currently, I am using a mix-match of code,... (1 Reply)
Discussion started by: Alux
1 Replies
Login or Register to Ask a Question