일상의 정리

GDB 디버깅 시 SIGPIPE 무시하기

프로그래밍/C++

GDB로 네트워크 프로그램을 디버깅 할 경우 SIGPIPE 시그널로 로 멈추는 경우가 발생한다.

SIGPIPE는 끊어진 소켓에 대해 쓰기 동작을 실행할 경우 발생하며, 실제로 처리를 제대로 했다면 에러가 아니므로 디버깅할 때는 무시하는 게 편하다.

이 때 디버그 실형 명령 전에 아래 명령을 입력해 주면 해당 시그널을 무시해 준다.

handle SIGPIPE nostop noprint pass
handle SIGINT nostop noprint pass

debconf: unable to initialize frontend: Dialog

리눅스/설치

apt update 시

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

위와 같은 메시지가 나올 경우 아래의 패키지를 설치해 준다.

apt -y install dialog

 

CentOS 7 에 redis 최신버전 (7.0.4) 설치

리눅스/설치

CentOS 7 에 redis 를 설치할 경우 기본 설치는 3.x 대이다.

최신 버전인 7.0.4 를 설치하려면 소스 컴파일을 하거나 아래의 방법을 이용하면 된다.

1. 먼저 리눅스를 최신버전으로 업데이트 한다.

sudo yum -y update

2. REMI Repository를 추가한다.

sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

3. REMI 리포지트리의 Redis를 설치한다.

sudo yum --enablerepo=remi install redis

설치가 끝난 후 설치 정보는 아래와 같다

rpm -qi redis
Name        : redis
Version     : 7.0.4
Release     : 1.el7.remi
Architecture: x86_64
Install Date: 2022년 09월 14일 (수) 오후 02시 03분 20초
Group       : Applications/Databases
Size        : 5356920
License     : BSD
Signature   : DSA/SHA1, 2022년 07월 18일 (월) 오후 11시 27분 20초, Key ID 004e6f4700f97f56
Source RPM  : redis-7.0.4-1.el7.remi.src.rpm
Build Date  : 2022년 07월 18일 (월) 오후 11시 26분 14초
Build Host  : builder.remirepo.net
Relocations : (not relocatable)
Packager    : Remi Collet
Vendor      : Remi's RPM repository <https://rpms.remirepo.net/> #StandWithUkraine
URL         : http://redis.io
Bug URL     : https://forum.remirepo.net/
Summary     : A persistent key-value database