qnx

Find a file that was created within five days of another file in shell

时间秒杀一切 提交于 2019-12-18 04:21:49
问题 i'm still pretty new to scripting so stick with me and if you have any questions please feel free to ask. Okay, so: I have a file let's say file.txt file.txt exists in a directory /this/is/the/directory/file.txt In a separate directory .log files exist that tell me what happens when file.txt was created. fuubar.log, fuu.log, bar.log, this.log, that.log, some.log, other.log ...there is an unknown number of these logs. I need to gather all the log files that occurred +-5 days of the file.txt

QNX pthread_mutex_lock causing deadlock error ( 45 = EDEADLK )

爷,独闯天下 提交于 2019-12-13 20:43:26
问题 I am implementing an asynchronous log writing mechanism for my project's multithreaded application. Below is the partial code of the part where the error occurs. void CTraceFileWriterThread::run() { bool fShoudIRun = shouldThreadsRun(); // Some global function which decided if operations need to stop. Not really relevant here. Assume "true" value. while(fShoudIRun) { std::string nextMessage = fetchNext(); if( !nextMessage.empty() ) { process(nextMessage); } else { fShoudIRun =

Retrieving the memory map of its own process in QNX

青春壹個敷衍的年華 提交于 2019-12-13 05:21:59
问题 In Linux if we look at the /proc/self/maps: 00400000-004ef000 r-xp 00000000 08:01 12845058 /bin/bash 006ef000-006f0000 r--p 000ef000 08:01 12845058 /bin/bash 006f0000-006f9000 rw-p 000f0000 08:01 12845058 /bin/bash 006f9000-006ff000 rw-p 00000000 00:00 0 00d5a000-010a2000 rw-p 00000000 00:00 0 [heap] 7f6fe582a000-7f6fe5835000 r-xp 00000000 08:01 1048595 /lib/x86_64-linux-gnu/libnss_files-2.19.so 7f6fe5835000-7f6fe5a34000 ---p 0000b000 08:01 1048595 /lib/x86_64-linux-gnu/libnss_files-2.19.so

Scanf with Signals

耗尽温柔 提交于 2019-12-13 02:51:38
问题 I have a signal that blocks SIGINT and basically says "Sorry, you can't quit.\n" The issue is this can occur during a scanf. When this occurs during a scanf, scanf takes in the printf as input. How can I do a printf that will cause scanf to basically hit the enter key automatically. I don't care that I am getting bad input. I just want to programatically finish that scanf with a printf or something else. Process: scanf("get stuff") -> User is able to enter stuff in. -> SIGINT occurs and goes

Usb mass storage file system location on QNX

末鹿安然 提交于 2019-12-13 00:37:09
问题 I need my software to be notifed that usb mass storage stick has been inserterd, also i need locationa where this stick has been mounted. Is it possible to obtain this information, especially location on fs where stick has been mounted from any C library ? For instertion i already know usbd_connect() and i'm using it. Unfortunatelly there is no information with respect to location on fs. regards JosiP 回答1: io-usb should be up and running on your target. Add the library "usbdi" to your project

How to get around “multiple defined symbols” in linking with gcc

余生颓废 提交于 2019-12-12 08:53:50
问题 I am using an older system that has gcc 2.95.3, I have to link in two objects that although they have nothing to do with each other, they each have similarly named methods. I can't rename either of them, but I would hope there is a way to build them as to not have the linker complain. The methods it is complaining about are each internally called by classes within the object. What can I do? 回答1: If you have a complete GNU toolchain, you should be able to work around your problem using objcopy

Find amount of installed memory on QNX system

爱⌒轻易说出口 提交于 2019-12-12 02:47:22
问题 How do I find the amount of memory installed on my QNX Neutrino system? uname -a doesn't show it top only shows how much memory is available I've looked at pidin syspage without success pidin mem shows all the used memory in gory detail 回答1: The amount of free RAM is the size of "/proc" ! In your own program, you can write something like this : #include <sys/stat.h> struct stat buf; if (stat("/proc", &buf) != -1) { printf("Mem free = %d\n", buf.st_size); } -- Hope this help Emmanuel 回答2:

how to solve this Linux Timer

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:26:52
问题 #include <features.h> #include <time.h> #include <sys/time.h> #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <string.h> #include <signal.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <sys/ioctl.h> #include <netinet/in.h> #include <arpa/inet.h> #define million 1000000L timer_t firstTimerID, secondTimerID, thirdTimerID; double Task2ms_Raster, Task10ms_Raster, Task100ms_Raster; struct sockaddr_in addr,

QNX runtime error: unknown symbol __stack_chk_guard

醉酒当歌 提交于 2019-12-11 13:17:42
问题 I'm trying to test the backward compatibility between QNX 6.6.0 and 6.5.0 (in concequence of an earlier question I've got). I compiled a relatively simple program using SDP6.6.0 and executed it on Neutrino 6.5.0. When I execute the program the follow runtime error pops up: unknown symbol: __stack_chk_guard ldd:FATAL: Could not resolve all symbols What is causing this?.. (I've found the solution but it wasn't working rightaway. When I started writing this question I realized the error I made.

Turn off Eigen Alignment in the PCL build

点点圈 提交于 2019-12-11 10:50:53
问题 So I have an issue where Eigen Alignment causes serious issues with the operating system I use, QNX. Basically the OS cannot deal with the memory that way and causes very interesting seg faults. See my other question here. Any way, for this reason I wish to disable the Eigen Alignment used in PCL before I build it. I have a couple of ideas about how i might do this. EIGEN INCLUDE FILES IN PCL So PCL has the structure for most of its modules like this (this is an example of the features module