13_02__shmUnlinkZ

ZC: Unix网络编程第2版 第2卷 第13章

 

1、mainUnlinkZ.cpp

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int _argc, char** _argv)
{
    printf("*** shmUnlink *** Z ***\n");

    if (_argc != 2)
    {
        printf("usage : shmunlink <name>\n");
        exit(0);
    }

    shm_unlink(_argv[1]);

    exit(0);
    return 0;
}

 

2、mainUnlinkZ.pro

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += \
    mainUnlinkZ.cpp

LIBS += -lrt

include(deployment.pri)
qtcAddDeployment()

 

3、

 

posted @ 2016-05-03 16:15  LinuxCode  阅读(129)  评论(0)    收藏  举报