hp-ux

C strchr works with NULL value on HPUX but segfaults on RHEL

时间秒杀一切 提交于 2020-01-25 06:52:49
问题 I'm moving some code from HPUX 11.11 to RHEL 7.5 and it includes a function that uses strchr. On HPUX it runs fine, and on RHEL there is a segmentation fault. I isolated the code and created the following simple test, with the subsequent results. It looks like HPUX strchr is returning an empty string rather than NULL when the character is not found. This is not what the man page says. I have found it might not be the strchr function but the difference in how HPUX handles NULL values, or a

AWK usage in shell script. Hp unix

时光毁灭记忆、已成空白 提交于 2020-01-14 05:41:50
问题 I'm unable to use the below command using shell script. awk '{a[NR]=$0} $0~s {f=NR} END {for (i=f-B;i<=f+A;i++) print a[i]}' B=1 A=5 s="5S5SDF" testfile Looking for a string "5S5SDF" in testfile. cat myscript #!/bin/ksh echo "The output is" awk '{a[NR]=$0} $0~s {f=NR} END {for (i=f-B;i<=f+A;i++) print a[i]}' B=1 A=4 s= "5S5SDF" testfile The system doesn't display anything, after i pause break i see error myscript[5]: 77144447 Quit myscript[6]: 5S5SDF: not found What am i missing? 来源: https:/

Get full path of executable of running process on HPUX

百般思念 提交于 2020-01-11 04:15:31
问题 I want to get the full path of the running process (executable) without having root permission using C++ code. Can someone suggest a way to achieve this. on Linux platforms i can do it by using following way. char exepath[1024] = {0}; char procid[1024] = {0}; char exelink[1024] = {0}; sprintf(procid, "%u", getpid()); strcpy(exelink, "/proc/"); strcat(exelink, procid); strcat(exelink, "/exe"); readlink(exelink, exepath, sizeof(exepath)); Here exepath gives us the full path of the executable.

Can't launch sonar 2.8 (permission denied to execute wrapper )

梦想的初衷 提交于 2019-12-24 09:00:38
问题 I'm new to Sonar, and i was trying to install Sonar 2.8 on my server (Linux 64 on HP-UX) When i tried to launch it (sonar.sh start) i got the following message [myHomeDirectory]/sonar/2.8/bin/linux-x86-64/./wrapper: Execute permission denied. what drives me crazy is that i've putthe whole package on 777 permissions, so i really don't understand what's exactly happening. Can anyone help with this please ? Thanks in advance ! 回答1: I hit a similar issue hence why I came to this post. I was

Find files modified within one hour in HP-UX

余生长醉 提交于 2019-12-22 00:25:21
问题 I'm searching through the manual page for find I can't see a way to run a command which will find all files modified within an hour. I can see only a way to do it for days. 回答1: Guess this should do find / -type f -mmin -60 This will be listing files starting from root and modified since the past 60 mins. 回答2: the best you can do in HP-UX using the find command is to look for everything that was modified in the last 24 hours. The HP-UX find command only checks modified time in 24-hour

Debug core file with no symbols

只愿长相守 提交于 2019-12-20 08:42:08
问题 I have a C application we have deployed to a customers site. It was compiled and runs on HP-UX. The user has reported a crash and we have obtained a core dump. So far, I've been unable to duplicate the crash in house. As you would suspect, the core file/deployed executable is completely devoid of any sort of symbols. When I load it up in gdb and do a bt, the best I get is this: (gdb) bt #0 0xc0199470 in ?? () I can do a 'strings core' on the file, but my understanding is that all I get there

vi: Line too long

橙三吉。 提交于 2019-12-19 17:34:06
问题 When I use vi to analyze log files, it sometimes is stuck with the error: 'Line too long'. I can watch the file using more , but that's not what I want. The command view leads to the same result and less is not installed. System is HP-UX v B.11.31 U ia64 What does this error mean? Does vi really have a limitation on how many characters per line is allowed? Is there a workaround how to get the files open and displayed in vi anyway? 回答1: (1) Apparently so :-) I've never run into a limitation in

How to get HPUX to adopt a TTY as controlling

*爱你&永不变心* 提交于 2019-12-13 03:07:46
问题 A question that came through on the sshpass mailing list (and also on stack overflow). Sshpass does not work on HP-UX. Looking at the truss output, I see the following: -u [/tmp/sshpass][14066]{3783827} fork() ................... (returning as child ...) ......... = 14064 {3783821} The child process is 14066. -u [/tmp/sshpass][14066]{3783827} setpgrp3(2)................................................. [entry] -u [/tmp/sshpass][14066]{3783827} setpgrp3(2)......................................

Equivalent of fesetflushtozero() on various Unices

最后都变了- 提交于 2019-12-11 01:31:18
问题 This question was migrated from Unix & Linux Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . HP-UX's libc has the function fesetflushtozero to switch floating-point behavior between “gradual underflow” and “flush to zero”. Despite combing through documentation and man pages of several Unix libc's (including glibc), I have yet to find how to achieve the same thing in other Unices. I'm particularly interest in Linux/glibc, Solaris and AIX. 回答1: As you have

Why does “git fetch” fail on HTTPS URLs with “Function is not available” on HP-UX?

独自空忆成欢 提交于 2019-12-07 21:49:12
问题 When I run git fetch I get the following: $ git fetch Password for 'xxx': error: cannot create thread: Function is not available fatal: cannot start thread to parse advertised refs $ 回答1: The issue is that this particular distribution of git/curl is lacking pthread. One way to fix it is to use LD_PRELOAD : $ LD_PRELOAD=/usr/lib/hpux32/libpthread.so git fetch Password for 'xxx': $ 回答2: For me, finally this problem was caused by Cannot allocate memory , low memory problem. So Pls check it. Hope